1 # Copyright 2014 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.
10 '../build/common_untrusted.gypi',
13 ['disable_nacl==0 and disable_nacl_untrusted==0', {
16 # nacl_helper_nonsfi is similar to nacl_helper (built in nacl.gyp)
17 # but for the NaCl plugin in Non-SFI mode.
18 # This binary is built using the PNaCl toolchain, but it is native
19 # linux binary and will run on Linux directly.
20 # Most library code can be shared with the one for untrusted build
21 # (i.e. the one for irt.nexe built by the NaCl/PNaCl toolchain), but
22 # as nacl_helper_nonsfi runs on Linux, there are some differences,
23 # such as MessageLoopForIO (which is based on libevent in Non-SFI
24 # mode) or ipc_channel implementation.
25 # Because of the toolchain, in both builds, OS_NACL macro (derived
26 # from __native_client__ macro) is defined. Code can test whether
27 # __native_client_nonsfi__ is #defined in order to determine
28 # whether it is being compiled for SFI mode or Non-SFI mode.
30 # Currently, nacl_helper_nonsfi is under development and the binary
31 # does nothing (i.e. it has only empty main(), now).
32 # TODO(crbug.com/358465): Implement it then switch nacl_helper in
33 # Non-SFI mode to nacl_helper_nonsfi.
34 'target_name': 'nacl_helper_nonsfi',
37 'nacl_untrusted_build': 1,
38 'nexe_target': 'nacl_helper_nonsfi',
39 # Rename the output binary file to nacl_helper_nonsfi and put it
40 # directly under out/{Debug,Release}/.
41 'out_newlib32_nonsfi': '<(PRODUCT_DIR)/nacl_helper_nonsfi',
46 'build_pnacl_newlib': 0,
47 'build_nonsfi_helper': 1,
50 'nacl/common/nacl_messages.cc',
51 'nacl/common/nacl_types.cc',
52 'nacl/common/nacl_types_param_traits.cc',
53 'nacl/loader/nacl_helper_linux.cc',
54 'nacl/loader/nacl_trusted_listener.cc',
55 'nacl/loader/nonsfi/nonsfi_listener.cc',
56 'nacl/loader/nonsfi/nonsfi_main.cc',
62 '-lcommand_buffer_client_nacl',
63 '-lcommand_buffer_common_nacl',
64 '-lcontent_common_nacl_nonsfi',
66 '-levent_nacl_nonsfi',
68 '-lgles2_cmd_helper_nacl',
69 '-lgles2_implementation_nacl',
73 '-llatency_info_nacl',
77 '-lppapi_shared_nacl',
78 '-lshared_memory_support_nacl',
84 ['target_arch=="ia32" or target_arch=="x64"', {
85 'extra_deps_newlib32_nonsfi': [
86 '>(tc_lib_dir_nonsfi_helper32)/libbase_nacl_nonsfi.a',
87 '>(tc_lib_dir_nonsfi_helper32)/libcommand_buffer_client_nacl.a',
88 '>(tc_lib_dir_nonsfi_helper32)/libcommand_buffer_common_nacl.a',
89 '>(tc_lib_dir_nonsfi_helper32)/libcontent_common_nacl_nonsfi.a',
90 '>(tc_lib_dir_nonsfi_helper32)/libelf_loader.a',
91 '>(tc_lib_dir_nonsfi_helper32)/libevent_nacl_nonsfi.a',
92 '>(tc_lib_dir_nonsfi_helper32)/libgio.a',
93 '>(tc_lib_dir_nonsfi_helper32)/libgles2_cmd_helper_nacl.a',
94 '>(tc_lib_dir_nonsfi_helper32)/libgles2_implementation_nacl.a',
95 '>(tc_lib_dir_nonsfi_helper32)/libgles2_utils_nacl.a',
96 '>(tc_lib_dir_nonsfi_helper32)/libgpu_ipc_nacl.a',
97 '>(tc_lib_dir_nonsfi_helper32)/libipc_nacl_nonsfi.a',
98 '>(tc_lib_dir_nonsfi_helper32)/liblatency_info_nacl.a',
99 '>(tc_lib_dir_nonsfi_helper32)/libplatform.a',
100 '>(tc_lib_dir_nonsfi_helper32)/libppapi_ipc_nacl.a',
101 '>(tc_lib_dir_nonsfi_helper32)/libppapi_proxy_nacl.a',
102 '>(tc_lib_dir_nonsfi_helper32)/libppapi_shared_nacl.a',
103 '>(tc_lib_dir_nonsfi_helper32)/libshared_memory_support_nacl.a',
104 '>(tc_lib_dir_nonsfi_helper32)/libtracing_nacl.a',
107 ['target_arch=="arm"', {
108 'extra_deps_newlib_arm_nonsfi': [
109 '>(tc_lib_dir_nonsfi_helper_arm)/libbase_nacl_nonsfi.a',
110 '>(tc_lib_dir_nonsfi_helper_arm)/libcommand_buffer_client_nacl.a',
111 '>(tc_lib_dir_nonsfi_helper_arm)/libcommand_buffer_common_nacl.a',
112 '>(tc_lib_dir_nonsfi_helper_arm)/libcontent_common_nacl_nonsfi.a',
113 '>(tc_lib_dir_nonsfi_helper_arm)/libelf_loader.a',
114 '>(tc_lib_dir_nonsfi_helper_arm)/libevent_nacl_nonsfi.a',
115 '>(tc_lib_dir_nonsfi_helper_arm)/libgio.a',
116 '>(tc_lib_dir_nonsfi_helper_arm)/libgles2_cmd_helper_nacl.a',
117 '>(tc_lib_dir_nonsfi_helper_arm)/libgles2_implementation_nacl.a',
118 '>(tc_lib_dir_nonsfi_helper_arm)/libgles2_utils_nacl.a',
119 '>(tc_lib_dir_nonsfi_helper_arm)/libgpu_ipc_nacl.a',
120 '>(tc_lib_dir_nonsfi_helper_arm)/libipc_nacl_nonsfi.a',
121 '>(tc_lib_dir_nonsfi_helper_arm)/liblatency_info_nacl.a',
122 '>(tc_lib_dir_nonsfi_helper_arm)/libplatform.a',
123 '>(tc_lib_dir_nonsfi_helper_arm)/libppapi_ipc_nacl.a',
124 '>(tc_lib_dir_nonsfi_helper_arm)/libppapi_proxy_nacl.a',
125 '>(tc_lib_dir_nonsfi_helper_arm)/libppapi_shared_nacl.a',
126 '>(tc_lib_dir_nonsfi_helper_arm)/libshared_memory_support_nacl.a',
127 '>(tc_lib_dir_nonsfi_helper_arm)/libtracing_nacl.a',
133 '../base/base_nacl.gyp:base_nacl_nonsfi',
134 '../content/content_nacl_nonsfi.gyp:content_common_nacl_nonsfi',
135 '../ipc/ipc_nacl.gyp:ipc_nacl_nonsfi',
136 '../native_client/src/nonsfi/irt/irt.gyp:nacl_sys_private',
137 '../native_client/src/nonsfi/loader/loader.gyp:elf_loader',
138 '../native_client/src/untrusted/nacl/nacl.gyp:nacl_lib_newlib',
139 '../native_client/tools.gyp:prep_toolchain',
140 '../ppapi/ppapi_proxy_nacl.gyp:ppapi_proxy_nacl',
143 # TODO(hidehiko): Add Non-SFI version of nacl_loader_unittests.