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) {
45 data_deps = [ "//ppapi/native_client:irt" ]
49 [ "//ppapi/native_client/src/untrusted/pnacl_support_extension" ]
53 source_set("nacl_browser") {
55 "browser/bad_message.cc",
56 "browser/bad_message.h",
57 "browser/nacl_broker_host_win.cc",
58 "browser/nacl_broker_host_win.h",
59 "browser/nacl_broker_service_win.cc",
60 "browser/nacl_broker_service_win.h",
61 "browser/nacl_browser.cc",
62 "browser/nacl_browser.h",
63 "browser/nacl_file_host.cc",
64 "browser/nacl_file_host.h",
65 "browser/nacl_host_message_filter.cc",
66 "browser/nacl_host_message_filter.h",
67 "browser/nacl_process_host.cc",
68 "browser/nacl_process_host.h",
69 "browser/nacl_validation_cache.cc",
70 "browser/nacl_validation_cache.h",
71 "browser/pnacl_host.cc",
72 "browser/pnacl_host.h",
73 "browser/pnacl_translation_cache.cc",
74 "browser/pnacl_translation_cache.h",
75 "common/nacl_debug_exception_handler_win.cc",
76 "common/nacl_debug_exception_handler_win.h",
84 "//base/third_party/dynamic_annotations",
85 "//content/public/browser",
86 "//content/public/common",
88 "//native_client/src/trusted/service_runtime:sel_main_chrome",
92 "//ppapi/shared_impl",
93 "//sandbox/linux:sandbox_services",
98 "zygote/nacl_fork_delegate_linux.cc",
99 "zygote/nacl_fork_delegate_linux.h",
102 deps += [ "//sandbox/linux:suid_sandbox_client" ]
106 source_set("nacl_renderer") {
108 "renderer/file_downloader.cc",
109 "renderer/file_downloader.h",
110 "renderer/histogram.cc",
111 "renderer/histogram.h",
112 "renderer/json_manifest.cc",
113 "renderer/json_manifest.h",
114 "renderer/manifest_downloader.cc",
115 "renderer/manifest_downloader.h",
116 "renderer/manifest_service_channel.cc",
117 "renderer/manifest_service_channel.h",
118 "renderer/nacl_helper.cc",
119 "renderer/nacl_helper.h",
120 "renderer/nexe_load_manager.cc",
121 "renderer/nexe_load_manager.h",
122 "renderer/platform_info.cc",
123 "renderer/platform_info.h",
124 "renderer/pnacl_translation_resource_host.cc",
125 "renderer/pnacl_translation_resource_host.h",
126 "renderer/ppb_nacl_private_impl.cc",
127 "renderer/ppb_nacl_private_impl.h",
128 "renderer/progress_event.cc",
129 "renderer/progress_event.h",
130 "renderer/trusted_plugin_channel.cc",
131 "renderer/trusted_plugin_channel.h",
137 "renderer/plugin:nacl_trusted_plugin",
139 "//content/public/common",
140 "//content/public/renderer",
145 "//ppapi/shared_impl",
146 "//third_party/WebKit/public:blink",
150 # TODO(GYP): Delete this after we've converted everything to GN.
151 # The _run targets exist only for compatibility w/ GYP.
152 group("nacl_loader_unittests_run") {
155 ":nacl_loader_unittests",
159 test("nacl_loader_unittests") {
161 "loader/nacl_ipc_adapter_unittest.cc",
162 "loader/nacl_validation_query_unittest.cc",
163 "loader/run_all_unittests.cc",
168 "//base/test:test_support",
169 "//ipc:test_support",
175 executable("nacl_helper") {
177 "loader/nacl_helper_linux.cc",
178 "loader/nacl_helper_linux.h",
186 "//build/config/sanitizers:deps",
187 "//content/public/common",
197 deps += [ "//sandbox/linux:libc_urandom_override" ]
201 source_set("nacl_linux") {
203 "//ppapi/nacl_irt/irt_manifest.h",
204 "//ppapi/nacl_irt/manifest_service.cc",
205 "//ppapi/nacl_irt/manifest_service.h",
206 "//ppapi/nacl_irt/plugin_main.cc",
207 "//ppapi/nacl_irt/plugin_main.h",
208 "//ppapi/nacl_irt/plugin_startup.cc",
209 "//ppapi/nacl_irt/plugin_startup.h",
210 "//ppapi/nacl_irt/ppapi_dispatcher.cc",
211 "//ppapi/nacl_irt/ppapi_dispatcher.h",
212 "loader/nonsfi/abi_conversion.cc",
213 "loader/nonsfi/abi_conversion.h",
214 "loader/nonsfi/elf_loader.cc",
215 "loader/nonsfi/elf_loader.h",
216 "loader/nonsfi/irt_basic.cc",
217 "loader/nonsfi/irt_clock.cc",
218 "loader/nonsfi/irt_exception_handling.cc",
219 "loader/nonsfi/irt_fdio.cc",
220 "loader/nonsfi/irt_futex.cc",
221 "loader/nonsfi/irt_icache.cc",
222 "loader/nonsfi/irt_interfaces.cc",
223 "loader/nonsfi/irt_interfaces.h",
224 "loader/nonsfi/irt_memory.cc",
225 "loader/nonsfi/irt_ppapi.cc",
226 "loader/nonsfi/irt_random.cc",
227 "loader/nonsfi/irt_resource_open.cc",
228 "loader/nonsfi/irt_thread.cc",
229 "loader/nonsfi/irt_util.h",
230 "loader/nonsfi/nonsfi_listener.cc",
231 "loader/nonsfi/nonsfi_listener.h",
232 "loader/nonsfi/nonsfi_main.cc",
233 "loader/nonsfi/nonsfi_main.h",
234 "loader/nonsfi/nonsfi_sandbox.cc",
235 "loader/nonsfi/nonsfi_sandbox.h",
236 "loader/sandbox_linux/nacl_bpf_sandbox_linux.cc",
237 "loader/sandbox_linux/nacl_sandbox_linux.cc",
240 defines = [ "IN_NACL_HELPER=1" ]
247 "//components/tracing",
248 "//content/public/common",
253 "//ppapi/shared_impl",
255 "//sandbox/linux:sandbox_services_headers",
259 configs += [ "//build/config/linux:glib" ]
262 if (use_seccomp_bpf) {
263 defines += [ "USE_SECCOMP_BPF" ]
270 group("nacl_helper") {
274 source_set("nacl_switches") {
276 "common/nacl_switches.cc",
277 "common/nacl_switches.h",
281 source_set("nacl_common") {
283 "common/nacl_cmd_line.cc",
284 "common/nacl_cmd_line.h",
285 "common/nacl_constants.cc",
286 "common/nacl_constants.h",
287 "common/nacl_host_messages.cc",
288 "common/nacl_host_messages.h",
289 "common/nacl_messages.cc",
290 "common/nacl_messages.h",
291 "common/nacl_nonsfi_util.cc",
292 "common/nacl_nonsfi_util.h",
293 "common/nacl_process_type.h",
294 "common/nacl_renderer_messages.cc",
295 "common/nacl_renderer_messages.h",
296 "common/nacl_sandbox_type.h",
297 "common/nacl_types.cc",
298 "common/nacl_types.h",
299 "common/nacl_types_param_traits.cc",
300 "common/nacl_types_param_traits.h",
301 "common/pnacl_types.cc",
302 "common/pnacl_types.h",
308 "//content/public/common",
315 "common/nacl_paths.cc",
316 "common/nacl_paths.h",
319 defines = [ "__STDC_LIMIT_MACROS=1" ]