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/crypto.gni")
6 import("//build/config/features.gni")
7 import("//build/config/ui.gni")
8 import("//testing/test.gni")
13 "loader/nacl_ipc_adapter.cc",
14 "loader/nacl_ipc_adapter.h",
15 "loader/nacl_listener.cc",
16 "loader/nacl_listener.h",
17 "loader/nacl_main.cc",
18 "loader/nacl_main_platform_delegate.h",
19 "loader/nacl_main_platform_delegate_linux.cc",
20 "loader/nacl_main_platform_delegate_mac.mm",
21 "loader/nacl_main_platform_delegate_win.cc",
22 "loader/nacl_trusted_listener.cc",
23 "loader/nacl_trusted_listener.h",
24 "loader/nacl_validation_db.h",
25 "loader/nacl_validation_query.cc",
26 "loader/nacl_validation_query.h",
34 "//content/public/common",
37 "//native_client/src/trusted/service_runtime:sel_main_chrome",
40 "//ppapi/shared_impl",
41 "//third_party/mojo/src/mojo/edk/embedder",
44 if (enable_nacl_untrusted) {
46 # TODO(GYP): handle other architectures correctly.
47 "//ppapi/native_client:nacl_irt(//build/toolchain/nacl:irt_x64)",
52 # TODO(GYP): handle other architectures correctly.
53 "//ppapi/native_client/src/untrusted/pnacl_support_extension",
58 source_set("nacl_browser") {
60 "browser/bad_message.cc",
61 "browser/bad_message.h",
62 "browser/nacl_broker_host_win.cc",
63 "browser/nacl_broker_host_win.h",
64 "browser/nacl_broker_service_win.cc",
65 "browser/nacl_broker_service_win.h",
66 "browser/nacl_browser.cc",
67 "browser/nacl_browser.h",
68 "browser/nacl_file_host.cc",
69 "browser/nacl_file_host.h",
70 "browser/nacl_host_message_filter.cc",
71 "browser/nacl_host_message_filter.h",
72 "browser/nacl_process_host.cc",
73 "browser/nacl_process_host.h",
74 "browser/nacl_validation_cache.cc",
75 "browser/nacl_validation_cache.h",
76 "browser/pnacl_host.cc",
77 "browser/pnacl_host.h",
78 "browser/pnacl_translation_cache.cc",
79 "browser/pnacl_translation_cache.h",
80 "common/nacl_debug_exception_handler_win.cc",
81 "common/nacl_debug_exception_handler_win.h",
89 "//base/third_party/dynamic_annotations",
90 "//content/public/browser",
91 "//content/public/common",
93 "//native_client/src/trusted/service_runtime:sel_main_chrome",
97 "//ppapi/shared_impl",
98 "//sandbox/linux:sandbox_services",
103 "zygote/nacl_fork_delegate_linux.cc",
104 "zygote/nacl_fork_delegate_linux.h",
107 deps += [ "//sandbox/linux:suid_sandbox_client" ]
111 source_set("nacl_renderer") {
113 "renderer/file_downloader.cc",
114 "renderer/file_downloader.h",
115 "renderer/histogram.cc",
116 "renderer/histogram.h",
117 "renderer/json_manifest.cc",
118 "renderer/json_manifest.h",
119 "renderer/manifest_downloader.cc",
120 "renderer/manifest_downloader.h",
121 "renderer/manifest_service_channel.cc",
122 "renderer/manifest_service_channel.h",
123 "renderer/nacl_helper.cc",
124 "renderer/nacl_helper.h",
125 "renderer/nexe_load_manager.cc",
126 "renderer/nexe_load_manager.h",
127 "renderer/platform_info.cc",
128 "renderer/platform_info.h",
129 "renderer/pnacl_translation_resource_host.cc",
130 "renderer/pnacl_translation_resource_host.h",
131 "renderer/ppb_nacl_private_impl.cc",
132 "renderer/ppb_nacl_private_impl.h",
133 "renderer/progress_event.cc",
134 "renderer/progress_event.h",
135 "renderer/trusted_plugin_channel.cc",
136 "renderer/trusted_plugin_channel.h",
142 "renderer/plugin:nacl_trusted_plugin",
144 "//content/public/common",
145 "//content/public/renderer",
150 "//ppapi/shared_impl",
151 "//third_party/WebKit/public:blink",
155 # TODO(GYP): Delete this after we've converted everything to GN.
156 # The _run targets exist only for compatibility w/ GYP.
157 group("nacl_loader_unittests_run") {
160 ":nacl_loader_unittests",
164 test("nacl_loader_unittests") {
166 "loader/nacl_ipc_adapter_unittest.cc",
167 "loader/nacl_validation_query_unittest.cc",
168 "loader/run_all_unittests.cc",
173 "//base/test:test_support",
174 "//ipc:test_support",
180 executable("nacl_helper") {
182 "loader/nacl_helper_linux.cc",
183 "loader/nacl_helper_linux.h",
191 "//build/config/sanitizers:deps",
192 "//content/public/common",
202 deps += [ "//sandbox/linux:libc_urandom_override" ]
206 source_set("nacl_linux") {
208 "//ppapi/nacl_irt/irt_manifest.h",
209 "//ppapi/nacl_irt/manifest_service.cc",
210 "//ppapi/nacl_irt/manifest_service.h",
211 "//ppapi/nacl_irt/plugin_main.cc",
212 "//ppapi/nacl_irt/plugin_main.h",
213 "//ppapi/nacl_irt/plugin_startup.cc",
214 "//ppapi/nacl_irt/plugin_startup.h",
215 "//ppapi/nacl_irt/ppapi_dispatcher.cc",
216 "//ppapi/nacl_irt/ppapi_dispatcher.h",
217 "loader/nonsfi/abi_conversion.cc",
218 "loader/nonsfi/abi_conversion.h",
219 "loader/nonsfi/elf_loader.cc",
220 "loader/nonsfi/elf_loader.h",
221 "loader/nonsfi/irt_basic.cc",
222 "loader/nonsfi/irt_clock.cc",
223 "loader/nonsfi/irt_exception_handling.cc",
224 "loader/nonsfi/irt_fdio.cc",
225 "loader/nonsfi/irt_futex.cc",
226 "loader/nonsfi/irt_icache.cc",
227 "loader/nonsfi/irt_interfaces.cc",
228 "loader/nonsfi/irt_interfaces.h",
229 "loader/nonsfi/irt_memory.cc",
230 "loader/nonsfi/irt_ppapi.cc",
231 "loader/nonsfi/irt_random.cc",
232 "loader/nonsfi/irt_resource_open.cc",
233 "loader/nonsfi/irt_thread.cc",
234 "loader/nonsfi/irt_util.h",
235 "loader/nonsfi/nonsfi_listener.cc",
236 "loader/nonsfi/nonsfi_listener.h",
237 "loader/nonsfi/nonsfi_main.cc",
238 "loader/nonsfi/nonsfi_main.h",
239 "loader/nonsfi/nonsfi_sandbox.cc",
240 "loader/nonsfi/nonsfi_sandbox.h",
241 "loader/sandbox_linux/nacl_bpf_sandbox_linux.cc",
242 "loader/sandbox_linux/nacl_sandbox_linux.cc",
245 defines = [ "IN_NACL_HELPER=1" ]
252 "//components/tracing",
253 "//content/public/common",
258 "//ppapi/shared_impl",
260 "//sandbox/linux:sandbox_services_headers",
264 configs += [ "//build/config/linux:glib" ]
267 if (use_seccomp_bpf) {
268 defines += [ "USE_SECCOMP_BPF" ]
277 source_set("nacl_switches") {
279 "common/nacl_switches.cc",
280 "common/nacl_switches.h",
284 source_set("nacl_common") {
286 "common/nacl_cmd_line.cc",
287 "common/nacl_cmd_line.h",
288 "common/nacl_constants.cc",
289 "common/nacl_constants.h",
290 "common/nacl_host_messages.cc",
291 "common/nacl_host_messages.h",
292 "common/nacl_messages.cc",
293 "common/nacl_messages.h",
294 "common/nacl_nonsfi_util.cc",
295 "common/nacl_nonsfi_util.h",
296 "common/nacl_process_type.h",
297 "common/nacl_renderer_messages.cc",
298 "common/nacl_renderer_messages.h",
299 "common/nacl_sandbox_type.h",
300 "common/nacl_types.cc",
301 "common/nacl_types.h",
302 "common/nacl_types_param_traits.cc",
303 "common/nacl_types_param_traits.h",
304 "common/pnacl_types.cc",
305 "common/pnacl_types.h",
311 "//content/public/common",
318 "common/nacl_paths.cc",
319 "common/nacl_paths.h",
322 defines = [ "__STDC_LIMIT_MACROS=1" ]