brettw | f4b4a428 | 2015-12-16 00:41:13 | [diff] [blame] | 1 | # Copyright 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. |
| 4 | |
Dirk Pranke | ccc0c36 | 2017-09-28 22:15:11 | [diff] [blame] | 5 | import("//components/nacl/features.gni") |
brettw | f4b4a428 | 2015-12-16 00:41:13 | [diff] [blame] | 6 | |
| 7 | assert(enable_nacl) |
| 8 | |
brettw | e664a26 | 2016-07-21 23:48:36 | [diff] [blame] | 9 | static_library("browser") { |
brettw | f4b4a428 | 2015-12-16 00:41:13 | [diff] [blame] | 10 | sources = [ |
| 11 | "bad_message.cc", |
| 12 | "bad_message.h", |
brettw | f4b4a428 | 2015-12-16 00:41:13 | [diff] [blame] | 13 | "nacl_browser.cc", |
| 14 | "nacl_browser.h", |
| 15 | "nacl_file_host.cc", |
| 16 | "nacl_file_host.h", |
| 17 | "nacl_host_message_filter.cc", |
| 18 | "nacl_host_message_filter.h", |
| 19 | "nacl_process_host.cc", |
| 20 | "nacl_process_host.h", |
| 21 | "nacl_validation_cache.cc", |
| 22 | "nacl_validation_cache.h", |
| 23 | "pnacl_host.cc", |
| 24 | "pnacl_host.h", |
| 25 | "pnacl_translation_cache.cc", |
| 26 | "pnacl_translation_cache.h", |
| 27 | ] |
| 28 | |
| 29 | deps = [ |
| 30 | "//base", |
| 31 | "//base/third_party/dynamic_annotations", |
Yuta Hijikata | ba10346 | 2020-11-30 08:33:35 | [diff] [blame] | 32 | "//build:chromeos_buildflags", |
brettw | f4b4a428 | 2015-12-16 00:41:13 | [diff] [blame] | 33 | "//components/nacl/common", |
Scott Violet | 9ae8289 | 2018-03-01 18:38:12 | [diff] [blame] | 34 | "//components/nacl/common:buildflags", |
brettw | f4b4a428 | 2015-12-16 00:41:13 | [diff] [blame] | 35 | "//components/nacl/common:debug_exception_handler", |
| 36 | "//components/url_formatter", |
| 37 | "//content/public/browser", |
| 38 | "//content/public/common", |
brettw | f4b4a428 | 2015-12-16 00:41:13 | [diff] [blame] | 39 | "//native_client/src/trusted/service_runtime:sel_main_chrome", |
| 40 | "//net", |
| 41 | "//ppapi/host", |
| 42 | "//ppapi/proxy:ipc", |
| 43 | "//ppapi/shared_impl", |
| 44 | ] |
| 45 | |
rockot | 38e46dd | 2017-03-24 16:55:13 | [diff] [blame] | 46 | public_deps = [ |
| 47 | "//ipc", |
Ken Rockot | 543f5e3 | 2018-02-04 02:13:50 | [diff] [blame] | 48 | "//services/service_manager/public/mojom", |
rockot | 38e46dd | 2017-03-24 16:55:13 | [diff] [blame] | 49 | ] |
| 50 | |
brettw | f4b4a428 | 2015-12-16 00:41:13 | [diff] [blame] | 51 | data_deps = [] |
| 52 | |
Sylvain Defresne | 1732713 | 2020-10-06 16:50:19 | [diff] [blame] | 53 | if (is_win) { |
| 54 | sources += [ |
| 55 | "nacl_broker_host_win.cc", |
| 56 | "nacl_broker_host_win.h", |
| 57 | "nacl_broker_service_win.cc", |
| 58 | "nacl_broker_service_win.h", |
| 59 | ] |
| 60 | } |
| 61 | |
Sean McAllister | 8ccdb764 | 2020-07-30 20:05:52 | [diff] [blame] | 62 | if (is_linux || is_chromeos) { |
brettw | f4b4a428 | 2015-12-16 00:41:13 | [diff] [blame] | 63 | sources += [ |
| 64 | "../zygote/nacl_fork_delegate_linux.cc", |
| 65 | "../zygote/nacl_fork_delegate_linux.h", |
| 66 | ] |
| 67 | |
| 68 | deps += [ |
| 69 | "//components/nacl/loader:nacl_helper_integration", |
| 70 | "//sandbox/linux:sandbox_services", |
| 71 | "//sandbox/linux:suid_sandbox_client", |
| 72 | ] |
| 73 | |
milko.leporis | 3de038d | 2016-08-18 09:59:37 | [diff] [blame] | 74 | if (enable_nacl_nonsfi) { |
| 75 | data_deps += [ "//components/nacl/loader:helper_nonsfi" ] |
| 76 | } |
brettw | f4b4a428 | 2015-12-16 00:41:13 | [diff] [blame] | 77 | } |
mcgrathr | a681f79 | 2016-01-11 20:48:10 | [diff] [blame] | 78 | |
| 79 | if (is_win && current_cpu == "x86") { |
| 80 | data_deps += [ "//components/nacl/broker:nacl64" ] |
| 81 | } |
brettw | f4b4a428 | 2015-12-16 00:41:13 | [diff] [blame] | 82 | } |
brucedawson | 5982933b | 2016-05-06 19:03:02 | [diff] [blame] | 83 | |
| 84 | source_set("unit_tests") { |
| 85 | testonly = true |
| 86 | sources = [ |
| 87 | "nacl_file_host_unittest.cc", |
| 88 | "nacl_process_host_unittest.cc", |
| 89 | "nacl_validation_cache_unittest.cc", |
| 90 | "pnacl_host_unittest.cc", |
| 91 | "pnacl_translation_cache_unittest.cc", |
| 92 | "test_nacl_browser_delegate.cc", |
thakis | b8590c9 | 2017-03-23 18:14:53 | [diff] [blame] | 93 | "test_nacl_browser_delegate.h", |
brucedawson | 5982933b | 2016-05-06 19:03:02 | [diff] [blame] | 94 | ] |
| 95 | |
| 96 | deps = [ |
| 97 | ":browser", |
| 98 | "//base", |
| 99 | "//components/nacl/common", |
| 100 | "//content/test:test_support", |
| 101 | "//net:test_support", |
| 102 | ] |
| 103 | |
Sean McAllister | 8ccdb764 | 2020-07-30 20:05:52 | [diff] [blame] | 104 | if (is_linux || is_chromeos) { |
brucedawson | 5982933b | 2016-05-06 19:03:02 | [diff] [blame] | 105 | sources += [ "../zygote/nacl_fork_delegate_linux_unittest.cc" ] |
| 106 | } |
| 107 | } |