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 ['target_arch!="arm" and target_arch!="mipsel"', {
99 # Only build the tests on arm and mips, but don't try to run them
101 'target_name': 'test_hello_world_nexe',
105 'src/trusted/service_runtime/service_runtime.gyp:sel_ldr',
108 'arch': '--arch=<(target_arch)',
109 'name': '--name=hello_world',
110 'path': '--path=<(PRODUCT_DIR)',
111 'script': '<(DEPTH)/native_client/build/test_build.py',
115 ['OS=="win" and target_arch=="ia32"', {
117 'src/trusted/service_runtime/service_runtime.gyp:sel_ldr64',
120 ['disable_glibc==0',{
122 'tools': '--tools=newlib',
126 'tools': '--tools=newlib',
132 'action_name': 'test build',
133 'msvs_cygwin_shell': 0,
134 'description': 'Testing NACL build',
136 '<!@(python <(script) -i <(arch) <(name) <(tools))',
138 # Add a bogus output file, to cause this step to always fire.
140 '<(PRODUCT_DIR)/test-output/dont_create_hello_world.out'
144 '<(DEPTH)/native_client/build/test_build.py',
148 # TODO(bradnelson): Hack here to prevent gyp path ending with \"
149 # being passed to python which incorrectly
150 # interprets this as escaped quote.
151 # http://code.google.com/p/chromium/issues/detail?id=141463
158 { # Test the hello world translated from pexe to nexe
159 'target_name': 'test_hello_world_pnacl_x86_64_nexe',
163 'src/trusted/service_runtime/service_runtime.gyp:sel_ldr',
166 'arch': '--arch=<(target_arch)',
167 'name': '--name=hello_world',
168 'path': '--path=<(PRODUCT_DIR)',
169 'tools': '--tools=pnacl_newlib',
170 'script': '<(DEPTH)/native_client/build/test_build.py',
173 ['OS=="win" and target_arch=="ia32"', {
175 'src/trusted/service_runtime/service_runtime.gyp:sel_ldr64',
181 'action_name': 'test pnacl nexe build',
182 'msvs_cygwin_shell': 0,
183 'description': 'Testing PNaCl translated Nexe build',
185 '<!@(python <(script) -i <(arch) <(name) <(tools))',
187 # Add a bogus output file, to cause this step to always fire.
189 '<(PRODUCT_DIR)/test-output/dont_create_hello_world_pnacl.out'
193 '<(DEPTH)/native_client/build/test_build.py',
197 # TODO(bradnelson): Hack here to prevent gyp path ending with \"
198 # being passed to python which incorrectly
199 # interprets this as escaped quote.
200 # http://code.google.com/p/chromium/issues/detail?id=141463