1 # Copyright (c) 2015 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.
5 import("//build/config/features.gni")
6 import("//build/config/ui.gni")
7 import("//testing/test.gni")
12 "loader/nacl_ipc_adapter.cc",
13 "loader/nacl_ipc_adapter.h",
14 "loader/nacl_listener.cc",
15 "loader/nacl_listener.h",
16 "loader/nacl_main.cc",
17 "loader/nacl_main_platform_delegate.h",
18 "loader/nacl_main_platform_delegate_linux.cc",
19 "loader/nacl_main_platform_delegate_mac.mm",
20 "loader/nacl_main_platform_delegate_win.cc",
21 "loader/nacl_trusted_listener.cc",
22 "loader/nacl_trusted_listener.h",
23 "loader/nacl_validation_db.h",
24 "loader/nacl_validation_query.cc",
25 "loader/nacl_validation_query.h",
33 "//content/public/common",
36 "//native_client/src/trusted/service_runtime:sel_main_chrome",
39 "//ppapi/shared_impl",
40 "//third_party/mojo/src/mojo/edk/embedder",
43 if (enable_nacl_untrusted) {
45 # TODO(GYP): handle other architectures correctly.
46 "//ppapi/native_client:nacl_irt(//native_client/build/toolchain/nacl:irt_x64)",
51 # TODO(GYP): handle other architectures correctly.
52 "//ppapi/native_client/src/untrusted/pnacl_support_extension",
57 source_set("nacl_browser") {
59 "browser/bad_message.cc",
60 "browser/bad_message.h",
61 "browser/nacl_broker_host_win.cc",
62 "browser/nacl_broker_host_win.h",
63 "browser/nacl_broker_service_win.cc",
64 "browser/nacl_broker_service_win.h",
65 "browser/nacl_browser.cc",
66 "browser/nacl_browser.h",
67 "browser/nacl_file_host.cc",
68 "browser/nacl_file_host.h",
69 "browser/nacl_host_message_filter.cc",
70 "browser/nacl_host_message_filter.h",
71 "browser/nacl_process_host.cc",
72 "browser/nacl_process_host.h",
73 "browser/nacl_validation_cache.cc",
74 "browser/nacl_validation_cache.h",
75 "browser/pnacl_host.cc",
76 "browser/pnacl_host.h",
77 "browser/pnacl_translation_cache.cc",
78 "browser/pnacl_translation_cache.h",
79 "common/nacl_debug_exception_handler_win.cc",
80 "common/nacl_debug_exception_handler_win.h",
88 "//base/third_party/dynamic_annotations",
89 "//content/public/browser",
90 "//content/public/common",
92 "//native_client/src/trusted/service_runtime:sel_main_chrome",
96 "//ppapi/shared_impl",
97 "//sandbox/linux:sandbox_services",
102 "zygote/nacl_fork_delegate_linux.cc",
103 "zygote/nacl_fork_delegate_linux.h",
106 deps += [ "//sandbox/linux:suid_sandbox_client" ]
110 source_set("nacl_renderer") {
112 "renderer/file_downloader.cc",
113 "renderer/file_downloader.h",
114 "renderer/histogram.cc",
115 "renderer/histogram.h",
116 "renderer/json_manifest.cc",
117 "renderer/json_manifest.h",
118 "renderer/manifest_downloader.cc",
119 "renderer/manifest_downloader.h",
120 "renderer/manifest_service_channel.cc",
121 "renderer/manifest_service_channel.h",
122 "renderer/nacl_helper.cc",
123 "renderer/nacl_helper.h",
124 "renderer/nexe_load_manager.cc",
125 "renderer/nexe_load_manager.h",
126 "renderer/platform_info.cc",
127 "renderer/platform_info.h",
128 "renderer/pnacl_translation_resource_host.cc",
129 "renderer/pnacl_translation_resource_host.h",
130 "renderer/ppb_nacl_private_impl.cc",
131 "renderer/ppb_nacl_private_impl.h",
132 "renderer/progress_event.cc",
133 "renderer/progress_event.h",
134 "renderer/trusted_plugin_channel.cc",
135 "renderer/trusted_plugin_channel.h",
141 "renderer/plugin:nacl_trusted_plugin",
143 "//content/public/common",
144 "//content/public/renderer",
149 "//ppapi/shared_impl",
150 "//third_party/WebKit/public:blink",
151 "//third_party/jsoncpp",
155 test("nacl_loader_unittests") {
157 "loader/nacl_ipc_adapter_unittest.cc",
158 "loader/nacl_validation_query_unittest.cc",
159 "loader/run_all_unittests.cc",
164 "//base/test:test_support",
165 "//ipc:test_support",
171 executable("nacl_helper") {
173 "loader/nacl_helper_linux.cc",
174 "loader/nacl_helper_linux.h",
182 "//content/public/common",
185 "//sandbox/linux:libc_urandom_override",
193 source_set("nacl_linux") {
195 "//ppapi/nacl_irt/irt_manifest.h",
196 "//ppapi/nacl_irt/manifest_service.cc",
197 "//ppapi/nacl_irt/manifest_service.h",
198 "//ppapi/nacl_irt/plugin_main.cc",
199 "//ppapi/nacl_irt/plugin_main.h",
200 "//ppapi/nacl_irt/plugin_startup.cc",
201 "//ppapi/nacl_irt/plugin_startup.h",
202 "//ppapi/nacl_irt/ppapi_dispatcher.cc",
203 "//ppapi/nacl_irt/ppapi_dispatcher.h",
204 "loader/nonsfi/abi_conversion.cc",
205 "loader/nonsfi/abi_conversion.h",
206 "loader/nonsfi/elf_loader.cc",
207 "loader/nonsfi/elf_loader.h",
208 "loader/nonsfi/irt_basic.cc",
209 "loader/nonsfi/irt_clock.cc",
210 "loader/nonsfi/irt_exception_handling.cc",
211 "loader/nonsfi/irt_fdio.cc",
212 "loader/nonsfi/irt_futex.cc",
213 "loader/nonsfi/irt_icache.cc",
214 "loader/nonsfi/irt_interfaces.cc",
215 "loader/nonsfi/irt_interfaces.h",
216 "loader/nonsfi/irt_memory.cc",
217 "loader/nonsfi/irt_ppapi.cc",
218 "loader/nonsfi/irt_random.cc",
219 "loader/nonsfi/irt_resource_open.cc",
220 "loader/nonsfi/irt_thread.cc",
221 "loader/nonsfi/irt_util.h",
222 "loader/nonsfi/nonsfi_listener.cc",
223 "loader/nonsfi/nonsfi_listener.h",
224 "loader/nonsfi/nonsfi_main.cc",
225 "loader/nonsfi/nonsfi_main.h",
226 "loader/nonsfi/nonsfi_sandbox.cc",
227 "loader/nonsfi/nonsfi_sandbox.h",
228 "loader/sandbox_linux/nacl_bpf_sandbox_linux.cc",
229 "loader/sandbox_linux/nacl_sandbox_linux.cc",
232 defines = [ "IN_NACL_HELPER=1" ]
239 "//components/tracing",
240 "//content/public/common",
245 "//ppapi/shared_impl",
247 "//sandbox/linux:libc_urandom_override",
248 "//sandbox/linux:sandbox_services_headers",
252 configs += [ "//build/config/linux:glib" ]
255 if (use_seccomp_bpf) {
256 defines += [ "USE_SECCOMP_BPF" ]
265 source_set("nacl_switches") {
267 "common/nacl_switches.cc",
268 "common/nacl_switches.h",
272 source_set("nacl_common") {
274 "common/nacl_cmd_line.cc",
275 "common/nacl_cmd_line.h",
276 "common/nacl_constants.cc",
277 "common/nacl_constants.h",
278 "common/nacl_host_messages.cc",
279 "common/nacl_host_messages.h",
280 "common/nacl_messages.cc",
281 "common/nacl_messages.h",
282 "common/nacl_nonsfi_util.cc",
283 "common/nacl_nonsfi_util.h",
284 "common/nacl_process_type.h",
285 "common/nacl_renderer_messages.cc",
286 "common/nacl_renderer_messages.h",
287 "common/nacl_sandbox_type.h",
288 "common/nacl_types.cc",
289 "common/nacl_types.h",
290 "common/nacl_types_param_traits.cc",
291 "common/nacl_types_param_traits.h",
292 "common/pnacl_types.cc",
293 "common/pnacl_types.h",
299 "//content/public/common",
306 "common/nacl_paths.cc",
307 "common/nacl_paths.h",
310 defines = [ "__STDC_LIMIT_MACROS=1" ]