OLD | NEW |
(Empty) | |
| 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. |
| 4 |
| 5 import("//build/config/features.gni") |
| 6 import("//build/config/ui.gni") |
| 7 |
| 8 if (enable_nacl) { |
| 9 source_set("nacl") { |
| 10 sources = [ |
| 11 "loader/nacl_ipc_adapter.cc", |
| 12 "loader/nacl_ipc_adapter.h", |
| 13 "loader/nacl_main.cc", |
| 14 "loader/nacl_main_platform_delegate.h", |
| 15 "loader/nacl_main_platform_delegate_linux.cc", |
| 16 "loader/nacl_main_platform_delegate_mac.mm", |
| 17 "loader/nacl_main_platform_delegate_win.cc", |
| 18 "loader/nacl_listener.cc", |
| 19 "loader/nacl_listener.h", |
| 20 "loader/nacl_trusted_listener.cc", |
| 21 "loader/nacl_trusted_listener.h", |
| 22 "loader/nacl_validation_db.h", |
| 23 "loader/nacl_validation_query.cc", |
| 24 "loader/nacl_validation_query.h", |
| 25 ] |
| 26 |
| 27 deps = [ |
| 28 "//base", |
| 29 "//base:base_static", |
| 30 "//ipc", |
| 31 "//mojo/nacl:monacl_sel", |
| 32 "//native_client/src/trusted/service_runtime:sel_main_chrome", |
| 33 "//ppapi/proxy:ipc", |
| 34 "//ppapi/shared_impl", |
| 35 ] |
| 36 |
| 37 if (enable_nacl_untrusted) { |
| 38 data_deps = [ |
| 39 # TODO(GYP): handle other cpu_arch's correctly. |
| 40 "//ppapi/native_client:nacl_irt(//native_client/build/toolchain/nacl:irt
_x64)", |
| 41 ] |
| 42 } |
| 43 if (enable_pnacl) { |
| 44 data_deps += [ |
| 45 # TODO(GYP): handle other cpu_arch's correctly. |
| 46 "//ppapi/native_client/src/untrusted/pnacl_support_extension", |
| 47 ] |
| 48 } |
| 49 } |
| 50 |
| 51 source_set("nacl_browser") { |
| 52 sources = [ |
| 53 "browser/nacl_broker_host_win.cc", |
| 54 "browser/nacl_broker_host_win.h", |
| 55 "browser/nacl_broker_service_win.cc", |
| 56 "browser/nacl_broker_service_win.h", |
| 57 "browser/nacl_browser.cc", |
| 58 "browser/nacl_browser.h", |
| 59 "browser/nacl_file_host.cc", |
| 60 "browser/nacl_file_host.h", |
| 61 "browser/nacl_host_message_filter.cc", |
| 62 "browser/nacl_host_message_filter.h", |
| 63 "browser/nacl_process_host.cc", |
| 64 "browser/nacl_process_host.h", |
| 65 "browser/nacl_validation_cache.cc", |
| 66 "browser/nacl_validation_cache.h", |
| 67 "browser/pnacl_host.cc", |
| 68 "browser/pnacl_host.h", |
| 69 "browser/pnacl_translation_cache.cc", |
| 70 "browser/pnacl_translation_cache.h", |
| 71 "common/nacl_debug_exception_handler_win.cc", |
| 72 "common/nacl_debug_exception_handler_win.h", |
| 73 ] |
| 74 |
| 75 deps = [ |
| 76 ":nacl_common", |
| 77 ":nacl_switches", |
| 78 "//native_client/src/trusted/service_runtime:sel_main_chrome", |
| 79 "//content//public/browser", |
| 80 ] |
| 81 |
| 82 if (is_linux) { |
| 83 sources += [ |
| 84 "zygote/nacl_fork_delegate_linux.cc", |
| 85 "zygote/nacl_fork_delegate_linux.h", |
| 86 ] |
| 87 |
| 88 deps += [ "//sandbox/linux:suid_sandbox_client" ] |
| 89 } |
| 90 } |
| 91 |
| 92 source_set("nacl_renderer") { |
| 93 sources = [ |
| 94 "renderer/file_downloader.cc", |
| 95 "renderer/file_downloader.h", |
| 96 "renderer/histogram.cc", |
| 97 "renderer/histogram.h", |
| 98 "renderer/manifest_downloader.cc", |
| 99 "renderer/manifest_downloader.h", |
| 100 "renderer/manifest_service_channel.cc", |
| 101 "renderer/manifest_service_channel.h", |
| 102 "renderer/nacl_helper.cc", |
| 103 "renderer/nacl_helper.h", |
| 104 "renderer/json_manifest.cc", |
| 105 "renderer/json_manifest.h", |
| 106 "renderer/nexe_load_manager.cc", |
| 107 "renderer/nexe_load_manager.h", |
| 108 "renderer/platform_info.cc", |
| 109 "renderer/platform_info.h", |
| 110 "renderer/pnacl_translation_resource_host.cc", |
| 111 "renderer/pnacl_translation_resource_host.h", |
| 112 "renderer/ppb_nacl_private_impl.cc", |
| 113 "renderer/ppb_nacl_private_impl.h", |
| 114 "renderer/progress_event.cc", |
| 115 "renderer/progress_event.h", |
| 116 "renderer/trusted_plugin_channel.cc", |
| 117 "renderer/trusted_plugin_channel.h", |
| 118 ] |
| 119 |
| 120 deps = [ |
| 121 ":nacl_common", |
| 122 "renderer/plugin:nacl_trusted_plugin", |
| 123 "//content/public/renderer", |
| 124 "//third_party/jsoncpp", |
| 125 "//third_party/WebKit/public:blink", |
| 126 ] |
| 127 } |
| 128 |
| 129 executable("nacl_loader_unittests") { |
| 130 testonly = true |
| 131 sources = [ |
| 132 "loader/run_all_unittests.cc", |
| 133 ] |
| 134 |
| 135 deps = [ |
| 136 ":nacl", |
| 137 "//base/test:test_support", |
| 138 "//testing/gtest", |
| 139 ] |
| 140 } |
| 141 |
| 142 if (is_linux) { |
| 143 executable("nacl_helper") { |
| 144 sources = [ |
| 145 "loader/nacl_helper_linux.cc", |
| 146 "loader/nacl_helper_linux.h", |
| 147 ] |
| 148 |
| 149 deps = [ |
| 150 ":nacl_linux", |
| 151 "//mojo/nacl:monacl_sel", |
| 152 ] |
| 153 |
| 154 cflags = [ "-fPIE" ] |
| 155 |
| 156 ldflags = [ "-pie" ] |
| 157 } |
| 158 |
| 159 source_set("nacl_linux") { |
| 160 sources = [ |
| 161 "loader/nonsfi/abi_conversion.cc", |
| 162 "loader/nonsfi/abi_conversion.h", |
| 163 "loader/nonsfi/elf_loader.cc", |
| 164 "loader/nonsfi/elf_loader.h", |
| 165 "loader/nonsfi/irt_basic.cc", |
| 166 "loader/nonsfi/irt_clock.cc", |
| 167 "loader/nonsfi/irt_exception_handling.cc", |
| 168 "loader/nonsfi/irt_fdio.cc", |
| 169 "loader/nonsfi/irt_futex.cc", |
| 170 "loader/nonsfi/irt_icache.cc", |
| 171 "loader/nonsfi/irt_interfaces.cc", |
| 172 "loader/nonsfi/irt_interfaces.h", |
| 173 "loader/nonsfi/irt_memory.cc", |
| 174 "loader/nonsfi/irt_ppapi.cc", |
| 175 "loader/nonsfi/irt_random.cc", |
| 176 "loader/nonsfi/irt_resource_open.cc", |
| 177 "loader/nonsfi/irt_thread.cc", |
| 178 "loader/nonsfi/irt_util.h", |
| 179 "loader/nonsfi/nonsfi_listener.cc", |
| 180 "loader/nonsfi/nonsfi_listener.h", |
| 181 "loader/nonsfi/nonsfi_main.cc", |
| 182 "loader/nonsfi/nonsfi_main.h", |
| 183 "loader/nonsfi/nonsfi_sandbox.cc", |
| 184 "loader/nonsfi/nonsfi_sandbox.h", |
| 185 "loader/sandbox_linux/nacl_bpf_sandbox_linux.cc", |
| 186 "loader/sandbox_linux/nacl_sandbox_linux.cc", |
| 187 "//ppapi/nacl_irt/irt_manifest.h", |
| 188 "//ppapi/nacl_irt/manifest_service.cc", |
| 189 "//ppapi/nacl_irt/manifest_service.h", |
| 190 "//ppapi/nacl_irt/plugin_main.cc", |
| 191 "//ppapi/nacl_irt/plugin_main.h", |
| 192 "//ppapi/nacl_irt/plugin_startup.cc", |
| 193 "//ppapi/nacl_irt/plugin_startup.h", |
| 194 "//ppapi/nacl_irt/ppapi_dispatcher.cc", |
| 195 "//ppapi/nacl_irt/ppapi_dispatcher.h", |
| 196 ] |
| 197 |
| 198 defines = [ "IN_NACL_HELPER=1" ] |
| 199 |
| 200 deps = [ |
| 201 ":nacl", |
| 202 ":nacl_common", |
| 203 ":nacl_switches", |
| 204 "//components/tracing", |
| 205 "//crypto", |
| 206 "//ppapi/proxy", |
| 207 "//sandbox/linux:libc_urandom_override", |
| 208 "//sandbox", |
| 209 ] |
| 210 |
| 211 if (use_glib) { |
| 212 configs += [ "//build/config/linux:glib" ] |
| 213 } |
| 214 |
| 215 if (use_seccomp_bpf) { |
| 216 defines += [ "USE_SECCOMP_BPF" ] |
| 217 } |
| 218 } |
| 219 } |
| 220 } else { |
| 221 group("nacl") { |
| 222 } |
| 223 } |
| 224 |
| 225 source_set("nacl_switches") { |
| 226 sources = [ |
| 227 "common/nacl_switches.cc", |
| 228 "common/nacl_switches.h", |
| 229 ] |
| 230 } |
| 231 |
| 232 source_set("nacl_common") { |
| 233 sources = [ |
| 234 "common/nacl_cmd_line.cc", |
| 235 "common/nacl_cmd_line.h", |
| 236 "common/nacl_constants.cc", |
| 237 "common/nacl_constants.h", |
| 238 "common/nacl_host_messages.h", |
| 239 "common/nacl_host_messages.cc", |
| 240 "common/nacl_messages.cc", |
| 241 "common/nacl_messages.h", |
| 242 "common/nacl_nonsfi_util.cc", |
| 243 "common/nacl_nonsfi_util.h", |
| 244 "common/nacl_process_type.h", |
| 245 "common/nacl_renderer_messages.h", |
| 246 "common/nacl_renderer_messages.cc", |
| 247 "common/nacl_sandbox_type_mac.h", |
| 248 "common/nacl_types.cc", |
| 249 "common/nacl_types.h", |
| 250 "common/nacl_types_param_traits.cc", |
| 251 "common/nacl_types_param_traits.h", |
| 252 "common/pnacl_types.cc", |
| 253 "common/pnacl_types.h", |
| 254 ] |
| 255 |
| 256 deps = [ |
| 257 "//content/public/common", |
| 258 ] |
| 259 |
| 260 if (is_linux) { |
| 261 sources += [ |
| 262 "common/nacl_paths.cc", |
| 263 "common/nacl_paths.h", |
| 264 ] |
| 265 |
| 266 defines = [ "__STDC_LIMIT_MACROS=1" ] |
| 267 } |
| 268 } |
OLD | NEW |