summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrettw <brettw@chromium.org>2015-12-14 18:57:27 -0800
committerCommit bot <commit-bot@chromium.org>2015-12-15 02:58:39 +0000
commit263435ba08cd291d9a0534719a599ad11098090a (patch)
tree24bfae36199f42d27d9eec5b0cf63b912869730e
parent3582bd764b1b26a70d765b8b744bc619b4bfc4e1 (diff)
downloadchromium_src-263435ba08cd291d9a0534719a599ad11098090a.zip
chromium_src-263435ba08cd291d9a0534719a599ad11098090a.tar.gz
chromium_src-263435ba08cd291d9a0534719a599ad11098090a.tar.bz2
Move nacl targets to subdirectories.
This clarifies the structure a bit and is the format recommended by GN style. Adds annotations to the GYP files for the corresponding GN targets. Removes some dead code in extensions/shell. R=dpranke@chromium.org Review URL: https://codereview.chromium.org/1523503002 Cr-Commit-Position: refs/heads/master@{#365139}
-rw-r--r--BUILD.gn6
-rw-r--r--chrome/browser/BUILD.gn2
-rw-r--r--chrome/common/BUILD.gn8
-rw-r--r--chrome/renderer/BUILD.gn4
-rw-r--r--chrome/test/BUILD.gn4
-rw-r--r--components/nacl.gyp10
-rw-r--r--components/nacl/BUILD.gn374
-rw-r--r--components/nacl/browser/BUILD.gn65
-rw-r--r--components/nacl/common/BUILD.gn67
-rw-r--r--components/nacl/loader/BUILD.gn189
-rw-r--r--components/nacl/loader/sandbox_linux/BUILD.gn37
-rw-r--r--components/nacl/renderer/BUILD.gn50
-rw-r--r--extensions/shell/BUILD.gn33
-rw-r--r--testing/buildbot/gn_isolate_map.pyl2
14 files changed, 435 insertions, 416 deletions
diff --git a/BUILD.gn b/BUILD.gn
index 3216b4c..c952580 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -453,13 +453,13 @@ group("both_gn_and_gyp") {
}
if (enable_nacl) {
- deps += [ "//components/nacl:nacl_loader_unittests" ]
+ deps += [ "//components/nacl/loader:nacl_loader_unittests" ]
if (is_linux) {
# TODO(dpranke): Figure out what platforms should actually have this.
deps += [
- "//components/nacl:helper_nonsfi",
- "//components/nacl:nacl_helper",
+ "//components/nacl/loader:helper_nonsfi",
+ "//components/nacl/loader:nacl_helper",
]
}
}
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index 4ff216c..05b70ce 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -478,7 +478,7 @@ source_set("browser") {
if (enable_nacl) {
sources +=
rebase_path(gypi_values.chrome_browser_nacl_sources, ".", "//chrome")
- deps += [ "//components/nacl:nacl_browser" ]
+ deps += [ "//components/nacl/browser" ]
}
if (enable_configuration_policy) {
diff --git a/chrome/common/BUILD.gn b/chrome/common/BUILD.gn
index 1912a22..9c79ff1 100644
--- a/chrome/common/BUILD.gn
+++ b/chrome/common/BUILD.gn
@@ -83,6 +83,7 @@ static_library("common") {
"//components/metrics",
"//components/metrics:net",
"//components/nacl/common:process_type",
+ "//components/nacl/common:switches",
"//components/omnibox/common",
"//components/policy:policy_component_common",
"//components/strings",
@@ -190,7 +191,7 @@ static_library("common") {
}
if (enable_nacl) {
- public_deps += [ "//components/nacl:nacl_common" ]
+ public_deps += [ "//components/nacl/common" ]
}
# Printing.
@@ -333,13 +334,10 @@ static_library("constants") {
"//base",
"//base/third_party/dynamic_annotations",
"//components/bookmarks/common",
+ "//components/nacl/common:switches",
"//third_party/widevine/cdm:version_h",
]
- if (enable_nacl) {
- deps += [ "//components/nacl:nacl_switches" ]
- }
-
if (is_android) {
# This dependency must only be added for Android.
#
diff --git a/chrome/renderer/BUILD.gn b/chrome/renderer/BUILD.gn
index 5882515..41b08b7 100644
--- a/chrome/renderer/BUILD.gn
+++ b/chrome/renderer/BUILD.gn
@@ -79,8 +79,8 @@ static_library("renderer") {
if (enable_nacl) {
deps += [
- "//components/nacl",
- "//components/nacl:nacl_renderer",
+ "//components/nacl/loader",
+ "//components/nacl/renderer",
]
}
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
index 8168d92..f393d0e 100644
--- a/chrome/test/BUILD.gn
+++ b/chrome/test/BUILD.gn
@@ -447,8 +447,8 @@ if (!is_android) {
if (enable_nacl) {
data_deps += [
- "//components/nacl:nacl_helper",
- "//components/nacl:helper_nonsfi",
+ "//components/nacl/loader:nacl_helper",
+ "//components/nacl/loader:helper_nonsfi",
]
}
diff --git a/components/nacl.gyp b/components/nacl.gyp
index e90fa16..a9ed69c 100644
--- a/components/nacl.gyp
+++ b/components/nacl.gyp
@@ -63,6 +63,7 @@
['disable_nacl!=1', {
'targets': [
{
+ # GN version: //components/nacl/loader
'target_name': 'nacl',
'type': 'static_library',
'variables': {
@@ -87,6 +88,7 @@
],
},
{
+ # GN version: //components/nacl/browser
'target_name': 'nacl_browser',
'type': 'static_library',
'sources': [
@@ -140,6 +142,7 @@
],
},
{
+ # GN version: //components/nacl/renderer
'target_name': 'nacl_renderer',
'type': 'static_library',
'sources': [
@@ -179,6 +182,7 @@
],
},
{
+ # GN version: //components/nacl/loader:nacl_loader_unittests
'target_name': 'nacl_loader_unittests',
'type': '<(gtest_target_type)',
'sources': [
@@ -198,6 +202,7 @@
['OS=="linux"', {
'targets': [
{
+ # GN version: //components/nacl/loader:nacl_helper
'target_name': 'nacl_helper',
'type': 'executable',
'include_dirs': [
@@ -221,6 +226,7 @@
'ldflags': ['-pie'],
},
}, {
+ # GN version: //components/nacl/loader/sandbox_linux
'target_name': 'nacl_linux',
'type': 'static_library',
'include_dirs': [
@@ -308,6 +314,7 @@
},
},
{
+ # GN version: //components/nacl/common:switches
'target_name': 'nacl_switches_win64',
'type': 'static_library',
'sources': [
@@ -324,6 +331,7 @@
},
},
{
+ # GN version: //components/nacl/common
'target_name': 'nacl_common_win64',
'type': 'static_library',
'defines': [
@@ -416,6 +424,7 @@
],
'targets': [
{
+ # GN version: //components/nacl/common:switches
'target_name': 'nacl_switches',
'type': 'static_library',
'sources': [
@@ -427,6 +436,7 @@
],
},
{
+ # GN version: //components/nacl/common
'target_name': 'nacl_common',
'type': 'static_library',
'sources': [
diff --git a/components/nacl/BUILD.gn b/components/nacl/BUILD.gn
deleted file mode 100644
index 7e20ecc..0000000
--- a/components/nacl/BUILD.gn
+++ /dev/null
@@ -1,374 +0,0 @@
-# Copyright (c) 2015 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import("//build/config/features.gni")
-import("//build/config/nacl/config.gni")
-import("//build/config/ui.gni")
-import("//testing/test.gni")
-
-if (enable_nacl) {
- source_set("nacl") {
- sources = [
- "loader/nacl_ipc_adapter.cc",
- "loader/nacl_ipc_adapter.h",
- "loader/nacl_listener.cc",
- "loader/nacl_listener.h",
- "loader/nacl_main.cc",
- "loader/nacl_main_platform_delegate.h",
- "loader/nacl_main_platform_delegate_linux.cc",
- "loader/nacl_main_platform_delegate_mac.mm",
- "loader/nacl_main_platform_delegate_win.cc",
- "loader/nacl_trusted_listener.cc",
- "loader/nacl_trusted_listener.h",
- "loader/nacl_validation_db.h",
- "loader/nacl_validation_query.cc",
- "loader/nacl_validation_query.h",
- ]
-
- deps = [
- ":nacl_common",
- ":nacl_switches",
- "//base",
- "//base:base_static",
- "//content/public/common",
- "//crypto",
- "//ipc",
- "//native_client/src/trusted/service_runtime:sel_main_chrome",
- "//ppapi/c",
- "//ppapi/proxy:ipc",
- "//ppapi/shared_impl",
- "//sandbox",
- "//third_party/mojo/src/mojo/edk/system",
- ]
-
- if (enable_nacl_untrusted) {
- data_deps = [
- "//ppapi/native_client:irt",
- ]
- }
- if (enable_pnacl) {
- data_deps +=
- [ "//ppapi/native_client/src/untrusted/pnacl_support_extension" ]
- }
- }
-
- source_set("nacl_browser") {
- sources = [
- "browser/bad_message.cc",
- "browser/bad_message.h",
- "browser/nacl_broker_host_win.cc",
- "browser/nacl_broker_host_win.h",
- "browser/nacl_broker_service_win.cc",
- "browser/nacl_broker_service_win.h",
- "browser/nacl_browser.cc",
- "browser/nacl_browser.h",
- "browser/nacl_file_host.cc",
- "browser/nacl_file_host.h",
- "browser/nacl_host_message_filter.cc",
- "browser/nacl_host_message_filter.h",
- "browser/nacl_process_host.cc",
- "browser/nacl_process_host.h",
- "browser/nacl_validation_cache.cc",
- "browser/nacl_validation_cache.h",
- "browser/pnacl_host.cc",
- "browser/pnacl_host.h",
- "browser/pnacl_translation_cache.cc",
- "browser/pnacl_translation_cache.h",
- "common/nacl_debug_exception_handler_win.cc",
- "common/nacl_debug_exception_handler_win.h",
- ]
-
- deps = [
- ":nacl_common",
- ":nacl_switches",
- "//base",
- "//base/third_party/dynamic_annotations",
- "//components/url_formatter",
- "//content/public/browser",
- "//content/public/common",
- "//ipc",
- "//native_client/src/trusted/service_runtime:sel_main_chrome",
- "//net",
- "//ppapi/host",
- "//ppapi/proxy:ipc",
- "//ppapi/shared_impl",
- ]
-
- data_deps = []
-
- if (is_linux) {
- sources += [
- "zygote/nacl_fork_delegate_linux.cc",
- "zygote/nacl_fork_delegate_linux.h",
- ]
-
- deps += [
- ":nacl_helper_integration",
- "//sandbox/linux:sandbox_services",
- "//sandbox/linux:suid_sandbox_client",
- ]
-
- data_deps += [ ":helper_nonsfi" ]
- }
- }
-
- source_set("nacl_renderer") {
- sources = [
- "renderer/file_downloader.cc",
- "renderer/file_downloader.h",
- "renderer/histogram.cc",
- "renderer/histogram.h",
- "renderer/json_manifest.cc",
- "renderer/json_manifest.h",
- "renderer/manifest_downloader.cc",
- "renderer/manifest_downloader.h",
- "renderer/manifest_service_channel.cc",
- "renderer/manifest_service_channel.h",
- "renderer/nacl_helper.cc",
- "renderer/nacl_helper.h",
- "renderer/nexe_load_manager.cc",
- "renderer/nexe_load_manager.h",
- "renderer/platform_info.cc",
- "renderer/platform_info.h",
- "renderer/pnacl_translation_resource_host.cc",
- "renderer/pnacl_translation_resource_host.h",
- "renderer/ppb_nacl_private_impl.cc",
- "renderer/ppb_nacl_private_impl.h",
- "renderer/progress_event.cc",
- "renderer/progress_event.h",
- "renderer/trusted_plugin_channel.cc",
- "renderer/trusted_plugin_channel.h",
- ]
-
- deps = [
- ":nacl_common",
- ":nacl_switches",
- "renderer/plugin:nacl_trusted_plugin",
- "//base",
- "//content/public/common",
- "//content/public/renderer",
- "//ipc",
- "//net",
- "//ppapi/c",
- "//ppapi/proxy:ipc",
- "//ppapi/shared_impl",
- "//third_party/WebKit/public:blink",
- ]
- }
-
- # TODO(GYP): Delete this after we've converted everything to GN.
- # The _run targets exist only for compatibility w/ GYP.
- group("nacl_loader_unittests_run") {
- testonly = true
- deps = [
- ":nacl_loader_unittests",
- ]
- }
-
- test("nacl_loader_unittests") {
- sources = [
- "loader/nacl_ipc_adapter_unittest.cc",
- "loader/nacl_validation_query_unittest.cc",
- "loader/run_all_unittests.cc",
- ]
-
- deps = [
- ":nacl",
- "//base/test:test_support",
- "//ipc:test_support",
- "//ppapi/c",
- "//testing/gtest",
- ]
- }
-
- if (is_linux) {
- executable("nacl_helper") {
- sources = [
- "loader/nacl_helper_linux.cc",
- "loader/nacl_helper_linux.h",
- ]
-
- deps = [
- ":nacl",
- ":nacl_linux",
- ":nacl_switches",
- "//base",
- "//build/config/sanitizers:deps",
- "//content/public/common",
- "//crypto",
- "//ipc",
- "//sandbox/linux:sandbox_services",
- ]
-
- cflags = [ "-fPIE" ]
-
- ldflags = [ "-pie" ]
-
- data_deps = [
- "//native_client/src/trusted/service_runtime/linux:bootstrap",
- ]
- }
-
- # For setting up nacl_helper.
- source_set("nacl_helper_integration") {
- public = [
- "loader/nacl_helper_linux.h",
- ]
- data_deps = [
- ":nacl_helper",
- ]
- }
-
- source_set("nacl_linux") {
- sources = [
- "loader/sandbox_linux/nacl_bpf_sandbox_linux.cc",
- "loader/sandbox_linux/nacl_sandbox_linux.cc",
- ]
-
- defines = [ "IN_NACL_HELPER=1" ]
-
- deps = [
- ":nacl",
- ":nacl_common",
- ":nacl_switches",
- "//base",
- "//content/public/common",
- "//crypto",
- "//ipc",
- "//sandbox",
- "//sandbox/linux:sandbox_services_headers",
- ]
-
- if (use_glib) {
- configs += [ "//build/config/linux:glib" ]
- }
-
- if (use_seccomp_bpf) {
- defines += [ "USE_SECCOMP_BPF" ]
- }
- }
- }
-
- if (is_nacl_nonsfi) {
- executable("nacl_helper_nonsfi_nexe") {
- output_name = "nacl_helper_nonsfi"
- set_sources_assignment_filter([])
- sources = [
- "common/nacl_messages.cc",
- "common/nacl_messages.h",
- "common/nacl_types.cc",
- "common/nacl_types.h",
- "common/nacl_types_param_traits.cc",
- "common/nacl_types_param_traits.h",
- "loader/nacl_helper_linux.cc",
- "loader/nacl_helper_linux.h",
- "loader/nacl_trusted_listener.cc",
- "loader/nacl_trusted_listener.h",
- "loader/nonsfi/nonsfi_listener.cc",
- "loader/nonsfi/nonsfi_listener.h",
- "loader/nonsfi/nonsfi_main.cc",
- "loader/nonsfi/nonsfi_main.h",
- ]
- deps = [
- ":nacl_helper_nonsfi_sandbox",
- ":nacl_switches",
- "//base",
- "//components/tracing",
- "//content",
- "//ipc",
- "//native_client/src/nonsfi/irt:nacl_sys_private",
- "//native_client/src/nonsfi/loader:elf_loader",
- "//native_client/src/untrusted/nacl:nacl",
- "//ppapi/proxy",
- "//sandbox/linux:sandbox",
- ]
- }
-
- source_set("nacl_helper_nonsfi_sandbox") {
- set_sources_assignment_filter([])
- sources = [
- "loader/nonsfi/nonsfi_sandbox.cc",
- "loader/nonsfi/nonsfi_sandbox.h",
- "loader/sandbox_linux/nacl_sandbox_linux.cc",
- "loader/sandbox_linux/nacl_sandbox_linux.h",
- ]
- deps = [
- ":nacl_switches",
- "//base",
- "//content",
- "//sandbox/linux:sandbox",
- "//sandbox/linux:sandbox_services_headers",
- ]
- }
-
- copy("nacl_helper_nonsfi_copy") {
- sources = [
- "${root_out_dir}/nacl_helper_nonsfi",
- ]
- outputs = [
- "${root_build_dir}/{{source_file_part}}",
- ]
- deps = [
- ":nacl_helper_nonsfi_nexe",
- ]
- }
- }
-
- group("helper_nonsfi") {
- deps = [
- ":nacl_helper_nonsfi_copy(//build/toolchain/nacl:newlib_pnacl_nonsfi)",
- ]
- }
-}
-
-# TODO(brettw) move to //components/nacl/common:switches
-source_set("nacl_switches") {
- sources = [
- "common/nacl_switches.cc",
- "common/nacl_switches.h",
- ]
-}
-
-# TODO(brettw) move to //components/nacl/common
-source_set("nacl_common") {
- sources = [
- "common/nacl_cmd_line.cc",
- "common/nacl_cmd_line.h",
- "common/nacl_constants.cc",
- "common/nacl_constants.h",
- "common/nacl_host_messages.cc",
- "common/nacl_host_messages.h",
- "common/nacl_messages.cc",
- "common/nacl_messages.h",
- "common/nacl_nonsfi_util.cc",
- "common/nacl_nonsfi_util.h",
- "common/nacl_process_type.h",
- "common/nacl_renderer_messages.cc",
- "common/nacl_renderer_messages.h",
- "common/nacl_sandbox_type.h",
- "common/nacl_types.cc",
- "common/nacl_types.h",
- "common/nacl_types_param_traits.cc",
- "common/nacl_types_param_traits.h",
- "common/pnacl_types.cc",
- "common/pnacl_types.h",
- ]
-
- deps = [
- ":nacl_switches",
- "//base",
- "//content/public/common",
- "//ipc",
- "//url",
- ]
-
- if (is_linux) {
- sources += [
- "common/nacl_paths.cc",
- "common/nacl_paths.h",
- ]
-
- defines = [ "__STDC_LIMIT_MACROS=1" ]
- }
-}
diff --git a/components/nacl/browser/BUILD.gn b/components/nacl/browser/BUILD.gn
new file mode 100644
index 0000000..b55fab1
--- /dev/null
+++ b/components/nacl/browser/BUILD.gn
@@ -0,0 +1,65 @@
+# Copyright 2015 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/config/features.gni")
+
+assert(enable_nacl)
+
+source_set("browser") {
+ sources = [
+ "bad_message.cc",
+ "bad_message.h",
+ "nacl_broker_host_win.cc",
+ "nacl_broker_host_win.h",
+ "nacl_broker_service_win.cc",
+ "nacl_broker_service_win.h",
+ "nacl_browser.cc",
+ "nacl_browser.h",
+ "nacl_file_host.cc",
+ "nacl_file_host.h",
+ "nacl_host_message_filter.cc",
+ "nacl_host_message_filter.h",
+ "nacl_process_host.cc",
+ "nacl_process_host.h",
+ "nacl_validation_cache.cc",
+ "nacl_validation_cache.h",
+ "pnacl_host.cc",
+ "pnacl_host.h",
+ "pnacl_translation_cache.cc",
+ "pnacl_translation_cache.h",
+ ]
+
+ deps = [
+ "//base",
+ "//base/third_party/dynamic_annotations",
+ "//components/nacl/common",
+ "//components/nacl/common:debug_exception_handler",
+ "//components/url_formatter",
+ "//content/public/browser",
+ "//content/public/common",
+ "//ipc",
+ "//native_client/src/trusted/service_runtime:sel_main_chrome",
+ "//net",
+ "//ppapi/host",
+ "//ppapi/proxy:ipc",
+ "//ppapi/shared_impl",
+ ]
+
+ data_deps = []
+
+ if (is_linux) {
+ sources += [
+ "../zygote/nacl_fork_delegate_linux.cc",
+ "../zygote/nacl_fork_delegate_linux.h",
+ ]
+
+ deps += [
+ "//components/nacl/loader:nacl_helper_integration",
+ "//sandbox/linux:sandbox_services",
+ "//sandbox/linux:suid_sandbox_client",
+ ]
+
+ data_deps += [ "//components/nacl/loader:helper_nonsfi" ]
+ }
+}
diff --git a/components/nacl/common/BUILD.gn b/components/nacl/common/BUILD.gn
index ab7fc75..5af9cbe 100644
--- a/components/nacl/common/BUILD.gn
+++ b/components/nacl/common/BUILD.gn
@@ -2,6 +2,66 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import("//build/config/features.gni")
+
+if (enable_nacl) {
+ source_set("common") {
+ sources = [
+ "nacl_cmd_line.cc",
+ "nacl_cmd_line.h",
+ "nacl_constants.cc",
+ "nacl_constants.h",
+ "nacl_host_messages.cc",
+ "nacl_host_messages.h",
+ "nacl_messages.cc",
+ "nacl_messages.h",
+ "nacl_nonsfi_util.cc",
+ "nacl_nonsfi_util.h",
+ "nacl_process_type.h",
+ "nacl_renderer_messages.cc",
+ "nacl_renderer_messages.h",
+ "nacl_sandbox_type.h",
+ "nacl_types.cc",
+ "nacl_types.h",
+ "nacl_types_param_traits.cc",
+ "nacl_types_param_traits.h",
+ "pnacl_types.cc",
+ "pnacl_types.h",
+ ]
+
+ public_deps = [
+ ":switches",
+ ]
+
+ deps = [
+ "//base",
+ "//content/public/common",
+ "//ipc",
+ "//url",
+ ]
+
+ if (is_linux) {
+ sources += [
+ "nacl_paths.cc",
+ "nacl_paths.h",
+ ]
+
+ defines = [ "__STDC_LIMIT_MACROS=1" ]
+ }
+ }
+
+ source_set("debug_exception_handler") {
+ sources = [
+ "nacl_debug_exception_handler_win.cc",
+ "nacl_debug_exception_handler_win.h",
+ ]
+
+ deps = [
+ "//base",
+ ]
+ }
+}
+
# Depending on this allows targets to unconditionally include
# nacl_process_type.h without testing whether nacl is enabled.
source_set("process_type") {
@@ -13,3 +73,10 @@ source_set("process_type") {
"//content/public/common",
]
}
+
+source_set("switches") {
+ sources = [
+ "nacl_switches.cc",
+ "nacl_switches.h",
+ ]
+}
diff --git a/components/nacl/loader/BUILD.gn b/components/nacl/loader/BUILD.gn
new file mode 100644
index 0000000..ed8f335
--- /dev/null
+++ b/components/nacl/loader/BUILD.gn
@@ -0,0 +1,189 @@
+# Copyright 2015 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/config/features.gni")
+import("//build/config/nacl/config.gni")
+import("//testing/test.gni")
+
+assert(enable_nacl)
+
+source_set("loader") {
+ sources = [
+ "nacl_ipc_adapter.cc",
+ "nacl_ipc_adapter.h",
+ "nacl_listener.cc",
+ "nacl_listener.h",
+ "nacl_main.cc",
+ "nacl_main_platform_delegate.h",
+ "nacl_main_platform_delegate_linux.cc",
+ "nacl_main_platform_delegate_mac.mm",
+ "nacl_main_platform_delegate_win.cc",
+ "nacl_trusted_listener.cc",
+ "nacl_trusted_listener.h",
+ "nacl_validation_db.h",
+ "nacl_validation_query.cc",
+ "nacl_validation_query.h",
+ ]
+
+ deps = [
+ "//base",
+ "//base:base_static",
+ "//components/nacl/common",
+ "//content/public/common",
+ "//crypto",
+ "//ipc",
+ "//native_client/src/trusted/service_runtime:sel_main_chrome",
+ "//ppapi/c",
+ "//ppapi/proxy:ipc",
+ "//ppapi/shared_impl",
+ "//sandbox",
+ "//third_party/mojo/src/mojo/edk/system",
+ ]
+
+ if (enable_nacl_untrusted) {
+ data_deps = [
+ "//ppapi/native_client:irt",
+ ]
+ }
+ if (enable_pnacl) {
+ data_deps +=
+ [ "//ppapi/native_client/src/untrusted/pnacl_support_extension" ]
+ }
+}
+
+# TODO(GYP): Delete this after we've converted everything to GN.
+# The _run targets exist only for compatibility w/ GYP.
+group("nacl_loader_unittests_run") {
+ testonly = true
+ deps = [
+ ":nacl_loader_unittests",
+ ]
+}
+
+test("nacl_loader_unittests") {
+ sources = [
+ "nacl_ipc_adapter_unittest.cc",
+ "nacl_validation_query_unittest.cc",
+ "run_all_unittests.cc",
+ ]
+
+ deps = [
+ ":loader",
+ "//base/test:test_support",
+ "//ipc:test_support",
+ "//ppapi/c",
+ "//testing/gtest",
+ ]
+}
+
+if (is_linux) {
+ executable("nacl_helper") {
+ sources = [
+ "nacl_helper_linux.cc",
+ "nacl_helper_linux.h",
+ ]
+
+ deps = [
+ ":loader",
+ "//base",
+ "//build/config/sanitizers:deps",
+ "//components/nacl/common:switches",
+ "//components/nacl/loader/sandbox_linux",
+ "//content/public/common",
+ "//crypto",
+ "//ipc",
+ "//sandbox/linux:sandbox_services",
+ ]
+
+ cflags = [ "-fPIE" ]
+
+ ldflags = [ "-pie" ]
+
+ data_deps = [
+ "//native_client/src/trusted/service_runtime/linux:bootstrap",
+ ]
+ }
+
+ # For setting up nacl_helper.
+ source_set("nacl_helper_integration") {
+ public = [
+ "nacl_helper_linux.h",
+ ]
+ data_deps = [
+ ":nacl_helper",
+ ]
+ }
+}
+
+if (is_nacl_nonsfi) {
+ executable("nacl_helper_nonsfi_nexe") {
+ output_name = "nacl_helper_nonsfi"
+ set_sources_assignment_filter([])
+ sources = [
+ # TODO(brettw) can this just depend on //components/nacl/common?
+ "../common/nacl_messages.cc",
+ "../common/nacl_messages.h",
+ "../common/nacl_types.cc",
+ "../common/nacl_types.h",
+ "../common/nacl_types_param_traits.cc",
+ "../common/nacl_types_param_traits.h",
+ "nacl_helper_linux.cc",
+ "nacl_helper_linux.h",
+ "nacl_trusted_listener.cc",
+ "nacl_trusted_listener.h",
+ "nonsfi/nonsfi_listener.cc",
+ "nonsfi/nonsfi_listener.h",
+ "nonsfi/nonsfi_main.cc",
+ "nonsfi/nonsfi_main.h",
+ ]
+ deps = [
+ ":nacl_helper_nonsfi_sandbox",
+ "//base",
+ "//components/nacl/common:switches",
+ "//components/tracing",
+ "//content",
+ "//ipc",
+ "//native_client/src/nonsfi/irt:nacl_sys_private",
+ "//native_client/src/nonsfi/loader:elf_loader",
+ "//native_client/src/untrusted/nacl:nacl",
+ "//ppapi/proxy",
+ "//sandbox/linux:sandbox",
+ ]
+ }
+
+ source_set("nacl_helper_nonsfi_sandbox") {
+ set_sources_assignment_filter([])
+ sources = [
+ "nonsfi/nonsfi_sandbox.cc",
+ "nonsfi/nonsfi_sandbox.h",
+ "sandbox_linux/nacl_sandbox_linux.cc",
+ "sandbox_linux/nacl_sandbox_linux.h",
+ ]
+ deps = [
+ "//base",
+ "//components/nacl/common:switches",
+ "//content",
+ "//sandbox/linux:sandbox",
+ "//sandbox/linux:sandbox_services_headers",
+ ]
+ }
+
+ copy("nacl_helper_nonsfi_copy") {
+ sources = [
+ "${root_out_dir}/nacl_helper_nonsfi",
+ ]
+ outputs = [
+ "${root_build_dir}/{{source_file_part}}",
+ ]
+ deps = [
+ ":nacl_helper_nonsfi_nexe",
+ ]
+ }
+}
+
+group("helper_nonsfi") {
+ deps = [
+ ":nacl_helper_nonsfi_copy(//build/toolchain/nacl:newlib_pnacl_nonsfi)",
+ ]
+}
diff --git a/components/nacl/loader/sandbox_linux/BUILD.gn b/components/nacl/loader/sandbox_linux/BUILD.gn
new file mode 100644
index 0000000..ce1d404
--- /dev/null
+++ b/components/nacl/loader/sandbox_linux/BUILD.gn
@@ -0,0 +1,37 @@
+# Copyright 2015 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/config/features.gni")
+import("//build/config/ui.gni")
+
+assert(is_linux)
+assert(enable_nacl)
+
+source_set("sandbox_linux") {
+ sources = [
+ "nacl_bpf_sandbox_linux.cc",
+ "nacl_sandbox_linux.cc",
+ ]
+
+ defines = [ "IN_NACL_HELPER=1" ]
+
+ deps = [
+ "//base",
+ "//components/nacl/common",
+ "//components/nacl/loader",
+ "//content/public/common",
+ "//crypto",
+ "//ipc",
+ "//sandbox",
+ "//sandbox/linux:sandbox_services_headers",
+ ]
+
+ if (use_glib) {
+ configs += [ "//build/config/linux:glib" ]
+ }
+
+ if (use_seccomp_bpf) {
+ defines += [ "USE_SECCOMP_BPF" ]
+ }
+}
diff --git a/components/nacl/renderer/BUILD.gn b/components/nacl/renderer/BUILD.gn
new file mode 100644
index 0000000..f6f5992
--- /dev/null
+++ b/components/nacl/renderer/BUILD.gn
@@ -0,0 +1,50 @@
+# Copyright 2015 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/config/features.gni")
+
+assert(enable_nacl)
+
+source_set("renderer") {
+ sources = [
+ "file_downloader.cc",
+ "file_downloader.h",
+ "histogram.cc",
+ "histogram.h",
+ "json_manifest.cc",
+ "json_manifest.h",
+ "manifest_downloader.cc",
+ "manifest_downloader.h",
+ "manifest_service_channel.cc",
+ "manifest_service_channel.h",
+ "nacl_helper.cc",
+ "nacl_helper.h",
+ "nexe_load_manager.cc",
+ "nexe_load_manager.h",
+ "platform_info.cc",
+ "platform_info.h",
+ "pnacl_translation_resource_host.cc",
+ "pnacl_translation_resource_host.h",
+ "ppb_nacl_private_impl.cc",
+ "ppb_nacl_private_impl.h",
+ "progress_event.cc",
+ "progress_event.h",
+ "trusted_plugin_channel.cc",
+ "trusted_plugin_channel.h",
+ ]
+
+ deps = [
+ "//base",
+ "//components/nacl/common",
+ "//components/nacl/renderer/plugin:nacl_trusted_plugin",
+ "//content/public/common",
+ "//content/public/renderer",
+ "//ipc",
+ "//net",
+ "//ppapi/c",
+ "//ppapi/proxy:ipc",
+ "//ppapi/shared_impl",
+ "//third_party/WebKit/public:blink",
+ ]
+}
diff --git a/extensions/shell/BUILD.gn b/extensions/shell/BUILD.gn
index 829ef00..0f8af6e 100644
--- a/extensions/shell/BUILD.gn
+++ b/extensions/shell/BUILD.gn
@@ -89,28 +89,6 @@ source_set("app_shell_lib") {
sources += chromeos_sources
}
- # TODO(GYP): Enable this when //components/nacl GN is done. See
- # http://crbug.com/430602
- if (false) {
- if (enable_nacl) {
- if (is_linux) {
- deps += [ "//components/nacl:nacl_helper" ]
- }
- deps += [
- "//components/nacl",
- "//components/nacl:browser",
- "//components/nacl:common",
- "//components/nacl:renderer",
- "//components/nacl:switches",
- ]
- nacl_sources =
- rebase_path(app_shell_gypi_values.app_shell_lib_sources_nacl,
- ".",
- "//extensions/shell")
- sources += nacl_sources
- }
- }
-
if (enable_nacl) {
sources += [
"browser/shell_nacl_browser_delegate.cc",
@@ -118,16 +96,15 @@ source_set("app_shell_lib") {
]
deps += [
- "//components/nacl",
- "//components/nacl:nacl_browser",
- "//components/nacl:nacl_common",
- "//components/nacl:nacl_renderer",
- "//components/nacl:nacl_switches",
+ "//components/nacl/browser",
+ "//components/nacl/common",
+ "//components/nacl/loader",
+ "//components/nacl/renderer",
"//components/nacl/renderer/plugin:nacl_trusted_plugin",
]
if (is_linux) {
- deps += [ "//components/nacl:nacl_helper" ]
+ deps += [ "//components/nacl/loader:nacl_helper" ]
}
}
diff --git a/testing/buildbot/gn_isolate_map.pyl b/testing/buildbot/gn_isolate_map.pyl
index d0bc091..0b38d60 100644
--- a/testing/buildbot/gn_isolate_map.pyl
+++ b/testing/buildbot/gn_isolate_map.pyl
@@ -317,7 +317,7 @@
"type": "unknown",
},
"nacl_loader_unittests": {
- "label": "//components/nacl:nacl_loader_unittests",
+ "label": "//components/nacl/loader:nacl_loader_unittests",
"type": "raw",
"args": [],
},