1 # Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
6 ######################################################################
10 ######################################################################
13 'target_name': 'hello_world_nexe',
16 'tools.gyp:prep_toolchain',
17 'src/untrusted/nacl/nacl.gyp:nacl_lib',
18 'src/untrusted/irt/irt.gyp:irt_core_nexe'
21 'nexe_target': 'hello_world',
24 'build_pnacl_newlib': 1,
25 'translate_pexe_with_build': 1,
31 'tests/hello_world/hello_world.c',
34 # Compile a file in the output directory to make sure build_nexe can handle
37 'target_name': 'copy_hello_world',
41 'destination': '<(SHARED_INTERMEDIATE_DIR)',
43 'tests/hello_world/hello_world.c',
49 'target_name': 'generated_hello_world_nexe',
52 'tools.gyp:prep_toolchain',
53 'src/untrusted/nacl/nacl.gyp:nacl_lib',
54 'src/untrusted/irt/irt.gyp:irt_core_nexe',
58 'nexe_target': 'generated_hello_world',
61 'build_pnacl_newlib': 0,
67 '<(SHARED_INTERMEDIATE_DIR)/hello_world.c',
70 # Build simple_thread_test to verify that __thread linkage works
71 # correctly with gyp-built libraries:
72 # https://code.google.com/p/chromium/issues/detail?id=3461
74 'target_name': 'simple_thread_test',
77 'tools.gyp:prep_toolchain',
78 'src/untrusted/nacl/nacl.gyp:nacl_lib',
79 'src/untrusted/irt/irt.gyp:irt_core_nexe'
81 'link_flags': ['-lpthread'],
82 # Bug 3461 only occurs when linking -fPIC objects so we use
83 # -fPIC here even though it isn't strictly necessary.
84 'compile_flags': ['-fPIC'],
86 'nexe_target': 'simple_thread_test',
89 'build_pnacl_newlib': 0,
92 'tests/threads/simple_thread_test.c',
97 ['OS!="android" and target_arch!="arm" and target_arch!="mipsel"', {
99 # If the target ABI is not compatible with host ABI,
100 # only build the tests, but don't try to run them.
102 'target_name': 'test_hello_world_nexe',
106 'src/trusted/service_runtime/service_runtime.gyp:sel_ldr',
109 'arch': '--arch=<(target_arch)',
110 'name': '--name=hello_world',
111 'path': '--path=<(PRODUCT_DIR)',
112 'script': '<(DEPTH)/native_client/build/test_build.py',
116 ['OS=="win" and target_arch=="ia32"', {
118 'src/trusted/service_runtime/service_runtime.gyp:sel_ldr64',
121 ['disable_glibc==0',{
123 'tools': '--tools=newlib',
127 'tools': '--tools=newlib',
133 'action_name': 'test build',
134 'msvs_cygwin_shell': 0,
135 'description': 'Testing NACL build',
137 '<!@(python <(script) -i <(arch) <(name) <(tools))',
139 # Add a bogus output file, to cause this step to always fire.
141 '<(PRODUCT_DIR)/test-output/dont_create_hello_world.out'
149 # TODO(bradnelson): Hack here to prevent gyp path ending with \"
150 # being passed to python which incorrectly
151 # interprets this as escaped quote.
152 # http://code.google.com/p/chromium/issues/detail?id=141463
159 { # Test the hello world translated from pexe to nexe
160 'target_name': 'test_hello_world_pnacl_x86_64_nexe',
164 'src/trusted/service_runtime/service_runtime.gyp:sel_ldr',
167 'arch': '--arch=<(target_arch)',
168 'name': '--name=hello_world',
169 'path': '--path=<(PRODUCT_DIR)',
170 'tools': '--tools=pnacl_newlib',
171 'script': '<(DEPTH)/native_client/build/test_build.py',
174 ['OS=="win" and target_arch=="ia32"', {
176 'src/trusted/service_runtime/service_runtime.gyp:sel_ldr64',
182 'action_name': 'test pnacl nexe build',
183 'msvs_cygwin_shell': 0,
184 'description': 'Testing PNaCl translated Nexe build',
186 '<!@(python <(script) -i <(arch) <(name) <(tools))',
188 # Add a bogus output file, to cause this step to always fire.
190 '<(PRODUCT_DIR)/test-output/dont_create_hello_world_pnacl.out'
198 # TODO(bradnelson): Hack here to prevent gyp path ending with \"
199 # being passed to python which incorrectly
200 # interprets this as escaped quote.
201 # http://code.google.com/p/chromium/issues/detail?id=141463