2 # Copyright (c) 2012 The Native Client Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
8 '../../../build/common.gypi',
12 'target_base': 'none',
14 'target_conditions': [
15 ['target_base=="sel"', {
22 'nacl_bootstrap_channel_error_reporter.c',
24 'nacl_desc_effector_ldr.c',
25 'nacl_desc_postmessage.c',
27 'nacl_error_log_hook.c',
29 'nacl_kernel_service.c',
31 'nacl_reverse_host_interface.c',
32 'nacl_reverse_quota_interface.c',
33 'nacl_runtime_host_interface.c',
34 'nacl_secure_service.c',
35 'nacl_signal_common.c',
36 'nacl_stack_safety.c',
37 'nacl_syscall_common.c',
38 'nacl_syscall_hook.c',
39 'nacl_syscall_list.c',
41 'nacl_valgrind_hooks.c',
42 'name_service/name_service.c',
46 'sel_ldr_thread_interface.c',
47 # TODO(mseaborn): Move sel_main_chrome.c to the
48 # "sel_main_chrome" library once Chromium is changed to
49 # depend on that rather than on "sel".
54 'sel_validate_image.c',
60 'sys_list_mappings.c',
64 'thread_suspension_common.c',
65 'thread_suspension_unwind.c',
68 # For generated header files from the x86-64 validator,
69 # e.g. nacl_disallows.h.
70 '<(SHARED_INTERMEDIATE_DIR)',
76 'osx/mach_exception_handler.c',
77 'osx/mach_thread_map.c',
79 'osx/nacl_thread_nice.c',
80 'osx/outer_sandbox.c',
81 'osx/thread_suspension.c',
82 'posix/addrspace_teardown.c',
84 'posix/x86/sel_segments.c',
88 'action_name': 'mig_exc_generation',
90 'gen_dir': '<(INTERMEDIATE_DIR)/native_client/src/trusted/service_runtime',
94 '$(SDKROOT)/usr/include/mach/exc.defs',
97 '<(gen_dir)/nacl_exc.h',
98 '<(gen_dir)/nacl_exc_server.c',
100 'process_outputs_as_sources': 1,
102 'python', '<@(_inputs)', '<@(_outputs)',
104 'message': 'Generating mig plumbing for exc.defs',
108 '<(INTERMEDIATE_DIR)',
113 'win/addrspace_teardown.c',
114 'win/debug_exception_handler.c',
115 'win/debug_exception_handler_standalone.c',
117 'win/nacl_thread_nice.c',
119 'win/sel_segments.c',
120 'win/thread_handle_map.c',
123 # TODO(gregoryd): move arm-specific stuff into a separate gyp file.
124 ['target_arch=="arm"', {
126 'arch/arm/nacl_app.c',
127 'arch/arm/nacl_switch_to_app_arm.c',
129 'arch/arm/nacl_tls.c',
130 'arch/arm/sel_ldr_arm.c',
131 'arch/arm/sel_addrspace_arm.c',
132 'arch/arm/nacl_switch.S',
133 'arch/arm/nacl_syscall.S',
134 'arch/arm/tramp_arm.S',
135 'linux/nacl_signal_arm.c',
138 ['target_arch=="mipsel"', {
140 'arch/mips/nacl_app.c',
141 'arch/mips/nacl_switch.S',
142 'arch/mips/nacl_switch_to_app_mips.c',
143 'arch/mips/nacl_syscall.S',
144 'arch/mips/nacl_tls.c',
145 'arch/mips/sel_addrspace_mips.c',
146 'arch/mips/sel_ldr_mips.c',
147 'arch/mips/sel_rt.c',
148 'arch/mips/tramp_mips.S',
149 'linux/nacl_signal_mips.c',
152 ['OS=="linux" or OS=="android"', {
154 'linux/nacl_bootstrap_args.c',
155 'linux/nacl_thread_nice.c',
157 'linux/reserved_at_zero.c',
158 'linux/thread_suspension.c',
159 'posix/addrspace_teardown.c',
160 'posix/sel_memory.c',
163 ['target_arch=="ia32" or target_arch=="x64"', {
165 'linux/x86/nacl_ldt.c',
166 'posix/x86/sel_segments.c',
169 ['target_arch=="arm"', {
171 'linux/arm/sel_segments.c',
174 ['target_arch=="mipsel"', {
176 'linux/mips/sel_segments.c',
183 'posix/nacl_signal_stack.c',
184 'posix/nacl_syscall_impl.c',
185 'posix/sel_addrspace_posix.c',
190 'win/nacl_signal_stack.c',
191 'win/nacl_syscall_impl.c',
192 'win/sel_addrspace_win.c',
193 'win/thread_suspension.c',
208 'target_name': 'sel',
209 'type': 'static_library',
211 'target_base': 'sel',
216 '<(DEPTH)/native_client/src/shared/gio/gio.gyp:gio',
217 '<(DEPTH)/native_client/src/shared/platform/platform.gyp:platform',
218 '<(DEPTH)/native_client/src/shared/srpc/srpc.gyp:nonnacl_srpc',
219 '<(DEPTH)/native_client/src/trusted/debug_stub/debug_stub.gyp:debug_stub',
220 '<(DEPTH)/native_client/src/trusted/desc/desc.gyp:nrd_xfer',
221 '<(DEPTH)/native_client/src/trusted/desc_cacheability/desc_cacheability.gyp:desc_cacheability',
222 '<(DEPTH)/native_client/src/trusted/fault_injection/fault_injection.gyp:nacl_fault_inject',
223 '<(DEPTH)/native_client/src/trusted/interval_multiset/interval_multiset.gyp:nacl_interval',
224 '<(DEPTH)/native_client/src/trusted/perf_counter/perf_counter.gyp:nacl_perf_counter',
225 '<(DEPTH)/native_client/src/trusted/platform_qualify/platform_qualify.gyp:platform_qual_lib',
226 '<(DEPTH)/native_client/src/trusted/manifest_name_service_proxy/manifest_name_service_proxy.gyp:manifest_proxy',
227 '<(DEPTH)/native_client/src/trusted/simple_service/simple_service.gyp:simple_service',
228 '<(DEPTH)/native_client/src/trusted/threading/threading.gyp:thread_interface',
229 '<(DEPTH)/native_client/src/trusted/validator/validator.gyp:validation_cache',
230 '<(DEPTH)/native_client/src/trusted/validator/validator.gyp:validators',
233 ['target_arch=="arm"', {
235 '<(DEPTH)/native_client/src/trusted/validator_arm/validator_arm.gyp:ncvalidate_arm_v2',
238 ['target_arch=="mipsel"', {
240 '<(DEPTH)/native_client/src/trusted/validator_mips/validator_mips.gyp:ncvalidate_mips',
243 ['target_arch=="ia32" or target_arch=="x64"', {
245 'arch/x86/service_runtime_x86.gyp:service_runtime_x86_common',
248 ['target_arch == "ia32"', {
250 'arch/x86_32/service_runtime_x86_32.gyp:service_runtime_x86_32',
251 '<(DEPTH)/native_client/src/trusted/validator_x86/validator_x86.gyp:nccopy_x86_32',
254 ['target_arch == "x64"', {
256 'arch/x86_64/service_runtime_x86_64.gyp:service_runtime_x86_64',
257 '<(DEPTH)/native_client/src/trusted/validator_x86/validator_x86.gyp:nccopy_x86_64',
260 ['OS=="linux" or OS=="FreeBSD" or OS=="android"', {
267 'target_name': 'nacl_error_code',
268 'type': 'static_library',
273 'target_name': 'env_cleanser',
274 'type': 'static_library',
279 'target_name': 'sel_main_chrome',
285 'target_name': 'sel_main',
286 'type': 'static_library',
294 'target_name': 'sel_ldr',
295 'type': 'executable',
298 '<(DEPTH)/native_client/src/shared/platform/platform.gyp:platform',
301 'nacl_test_injection_main.c',
305 ['OS=="linux" or OS=="android"', {
307 'linux/nacl_bootstrap.gyp:nacl_helper_bootstrap',
317 ['OS=="win" and target_arch=="ia32"', {
320 'target_name': 'sel64',
321 'type': 'static_library',
323 'target_base': 'sel',
329 '<(DEPTH)/native_client/src/shared/gio/gio.gyp:gio64',
330 '<(DEPTH)/native_client/src/shared/srpc/srpc.gyp:nonnacl_srpc64',
331 '<(DEPTH)/native_client/src/trusted/debug_stub/debug_stub.gyp:debug_stub64',
332 '<(DEPTH)/native_client/src/trusted/desc/desc.gyp:nrd_xfer64',
333 '<(DEPTH)/native_client/src/trusted/desc_cacheability/desc_cacheability.gyp:desc_cacheability64',
334 '<(DEPTH)/native_client/src/trusted/fault_injection/fault_injection.gyp:nacl_fault_inject64',
335 '<(DEPTH)/native_client/src/trusted/interval_multiset/interval_multiset.gyp:nacl_interval64',
336 '<(DEPTH)/native_client/src/trusted/perf_counter/perf_counter.gyp:nacl_perf_counter64',
337 '<(DEPTH)/native_client/src/trusted/platform_qualify/platform_qualify.gyp:platform_qual_lib64',
338 '<(DEPTH)/native_client/src/trusted/manifest_name_service_proxy/manifest_name_service_proxy.gyp:manifest_proxy64',
339 '<(DEPTH)/native_client/src/trusted/simple_service/simple_service.gyp:simple_service64',
340 '<(DEPTH)/native_client/src/trusted/threading/threading.gyp:thread_interface64',
341 '<(DEPTH)/native_client/src/trusted/validator_x86/validator_x86.gyp:nccopy_x86_64',
342 '<(DEPTH)/native_client/src/trusted/validator/validator.gyp:validation_cache64',
343 '<(DEPTH)/native_client/src/trusted/validator/validator.gyp:validators64',
344 'arch/x86/service_runtime_x86.gyp:service_runtime_x86_common64',
345 'arch/x86_64/service_runtime_x86_64.gyp:service_runtime_x86_64',
348 'target_name': 'nacl_error_code64',
349 'type': 'static_library',
358 'target_name': 'env_cleanser64',
359 'type': 'static_library',
368 'target_name': 'sel_main_chrome64',
378 'target_name': 'sel_main64',
379 'type': 'static_library',
391 'target_name': 'sel_ldr64',
392 'type': 'executable',
398 '<(DEPTH)/native_client/src/shared/platform/platform.gyp:platform64',
401 'nacl_test_injection_main.c',
406 ['OS=="linux" or OS=="FreeBSD" or OS=="android"', {
409 # This has to be an independent target in order to benefit from
411 'target_name': 'nacl_signal',
412 'type': 'static_library',
414 ['target_arch=="ia32"', {
415 # nacl_signal.c needs to be compiled without the stack
417 # See https://code.google.com/p/nativeclient/issues/detail?id=3581.
420 '-fstack-protector-all',
423 '-fno-stack-protector',
428 'linux/nacl_signal.c',