diff options
author | sammc <sammc@chromium.org> | 2015-04-27 17:14:54 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-04-28 00:15:03 +0000 |
commit | d06e3fcfcc33e9e5a9f427e21a17054a981fc7b9 (patch) | |
tree | b5eb83e6c48d1b66869d237d1da77f7e3d7486be | |
parent | 41e95b4626a4b857c884f0ccdac7e68707c3390d (diff) | |
download | chromium_src-d06e3fcfcc33e9e5a9f427e21a17054a981fc7b9.zip chromium_src-d06e3fcfcc33e9e5a9f427e21a17054a981fc7b9.tar.gz chromium_src-d06e3fcfcc33e9e5a9f427e21a17054a981fc7b9.tar.bz2 |
Fix //content/test:test_support under component builds.
Previously, //content/test:test_support depended directly on *_sources
targets. In component builds, this caused the browser_tests and
content_browsertests binaries to include their own copies of content as
well as depend on libcontent.so. This caused browser_tests and
content_browsertests to crash on startup. This CL changes test_support
to depend on the targets that forward to //content in component builds
and introduces such targets for gpu and ppapi_plugin.
The test_support changes also exposed underspecified dependencies in
extensions/renderer/BUILD.gn and third_party/libjingle/BUILD.gn, and
incorrect generated file dependencies in content/browser/devtools; the
generated files depend on other non-generated files so have to be
directly included in //content/browser.
BUG=432959
Review URL: https://codereview.chromium.org/1104973002
Cr-Commit-Position: refs/heads/master@{#327188}
-rw-r--r-- | content/BUILD.gn | 4 | ||||
-rw-r--r-- | content/app/BUILD.gn | 2 | ||||
-rw-r--r-- | content/browser/BUILD.gn | 3 | ||||
-rw-r--r-- | content/browser/devtools/BUILD.gn | 8 | ||||
-rw-r--r-- | content/gpu/BUILD.gn | 17 | ||||
-rw-r--r-- | content/ppapi_plugin/BUILD.gn | 16 | ||||
-rw-r--r-- | content/test/BUILD.gn | 13 | ||||
-rw-r--r-- | extensions/renderer/BUILD.gn | 1 | ||||
-rw-r--r-- | third_party/libjingle/BUILD.gn | 1 |
9 files changed, 45 insertions, 20 deletions
diff --git a/content/BUILD.gn b/content/BUILD.gn index e31ea82..802ab2b 100644 --- a/content/BUILD.gn +++ b/content/BUILD.gn @@ -38,7 +38,7 @@ config("content_implementation") { # when doing a component build). content_shared_components = [ - "//content/gpu", + "//content/gpu:gpu_sources", "//content/public/browser:browser_sources", "//content/public/child:child_sources", "//content/public/common:common_sources", @@ -48,7 +48,7 @@ content_shared_components = [ ] if (enable_plugins) { - content_shared_components += [ "//content/ppapi_plugin" ] + content_shared_components += [ "//content/ppapi_plugin:ppapi_plugin_sources" ] } if (is_component_build) { diff --git a/content/app/BUILD.gn b/content/app/BUILD.gn index 4e48811..f6c72b9 100644 --- a/content/app/BUILD.gn +++ b/content/app/BUILD.gn @@ -72,7 +72,7 @@ content_app_extra_configs = [ ] if (!is_chrome_multiple_dll) { - content_app_deps += [ "//content/gpu" ] + content_app_deps += [ "//content/gpu:gpu_sources" ] } # This includes the app sources for both the browser and child processes. diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn index 3a28e3d..5accb52 100644 --- a/content/browser/BUILD.gn +++ b/content/browser/BUILD.gn @@ -89,8 +89,6 @@ source_set("browser") { "$root_gen_dir/blink/grit/devtools_resources.h", "$root_gen_dir/blink/grit/devtools_resources_map.cc", "$root_gen_dir/blink/grit/devtools_resources_map.h", - "$root_gen_dir/content/browser/devtools/protocol/devtools_protocol_dispatcher.cc", - "$root_gen_dir/content/browser/devtools/protocol/devtools_protocol_dispatcher.h", "$root_gen_dir/content/browser/tracing/grit/tracing_resources.h", "$root_gen_dir/ui/resources/grit/webui_resources_map.cc", ], @@ -103,6 +101,7 @@ source_set("browser") { "//components/scheduler:common", "//content/app/resources", "//content/app/strings", + "//content/browser/devtools:gen_devtools_protocol_handler", "//content/browser/devtools:resources", "//content/common:mojo_bindings", "//content/public/common:mojo_bindings", diff --git a/content/browser/devtools/BUILD.gn b/content/browser/devtools/BUILD.gn index a44c55ad..e65cfe7 100644 --- a/content/browser/devtools/BUILD.gn +++ b/content/browser/devtools/BUILD.gn @@ -8,7 +8,6 @@ import("//tools/grit/grit_rule.gni") group("resources") { deps = [ ":devtools_resources", - ":devtools_protocol_handler", ] } @@ -36,7 +35,7 @@ grit("devtools_resources") { } action("gen_devtools_protocol_handler") { - visibility = [ ":devtools_protocol_handler" ] + visibility = [ "//content/browser" ] script = "//content/browser/devtools/protocol/" + "devtools_protocol_handler_generator.py" @@ -56,8 +55,3 @@ action("gen_devtools_protocol_handler") { args = rebase_path(inputs, root_build_dir) + rebase_path(outputs, root_build_dir) } - -source_set("devtools_protocol_handler") { - visibility = [ ":resources" ] - sources = get_target_outputs(":gen_devtools_protocol_handler") -} diff --git a/content/gpu/BUILD.gn b/content/gpu/BUILD.gn index d43bb82..5ef0014 100644 --- a/content/gpu/BUILD.gn +++ b/content/gpu/BUILD.gn @@ -5,7 +5,22 @@ import("//build/config/ui.gni") import("//content/content.gni") -source_set("gpu") { +# See //content/BUILD.gn for how this works. +group("gpu") { + visibility = [ "//content/*" ] + + if (is_component_build) { + public_deps = [ + "//content", + ] + } else { + public_deps = [ + ":gpu_sources", + ] + } +} + +source_set("gpu_sources") { visibility = [ "//content/*" ] sources = [ diff --git a/content/ppapi_plugin/BUILD.gn b/content/ppapi_plugin/BUILD.gn index 971a060..b4a6704 100644 --- a/content/ppapi_plugin/BUILD.gn +++ b/content/ppapi_plugin/BUILD.gn @@ -2,7 +2,21 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -source_set("ppapi_plugin") { +group("ppapi_plugin") { + visibility = [ "//content/*" ] + + if (is_component_build) { + public_deps = [ + "//content", + ] + } else { + public_deps = [ + ":ppapi_plugin_sources", + ] + } +} + +source_set("ppapi_plugin_sources") { visibility = [ "//content/*" ] sources = [ diff --git a/content/test/BUILD.gn b/content/test/BUILD.gn index 8c8d36af..3064d04 100644 --- a/content/test/BUILD.gn +++ b/content/test/BUILD.gn @@ -25,8 +25,8 @@ static_library("test_support") { deps = [ "//cc/blink", "//content/public/app:both", - "//content/public/browser:browser_sources", - "//content/public/common:common_sources", + "//content/public/browser", + "//content/public/common", "//net:test_support", "//skia", "//storage/common", @@ -56,11 +56,11 @@ static_library("test_support") { deps += [ "//components/scheduler:scheduler", "//content/browser/speech/proto", - "//content/public/child:child_sources", + "//content/public/child", "//content/gpu", - "//content/public/plugin:plugin_sources", - "//content/public/renderer:renderer_sources", - "//content/public/utility:utility_sources", + "//content/public/plugin", + "//content/public/renderer", + "//content/public/utility", "//content/shell:pak", "//cc", "//cc:test_support", @@ -452,6 +452,7 @@ if (!is_mac) { # TODO(GYP) enable on Mac once it links. "//content/browser/notifications:notification_proto", "//content/browser/service_worker:service_worker_proto", "//content/browser/speech/proto", + "//content/common:mojo_bindings", "//content/public/browser", "//content/public/common", "//content/public/common:mojo_bindings", diff --git a/extensions/renderer/BUILD.gn b/extensions/renderer/BUILD.gn index 1bfceef..19e894f 100644 --- a/extensions/renderer/BUILD.gn +++ b/extensions/renderer/BUILD.gn @@ -24,5 +24,6 @@ source_set("renderer") { "//skia", "//third_party/WebKit/public:blink", "//third_party/mojo/src/mojo/edk/js", + "//third_party/mojo/src/mojo/public/js", ] } diff --git a/third_party/libjingle/BUILD.gn b/third_party/libjingle/BUILD.gn index f17bfa8..ade2f66 100644 --- a/third_party/libjingle/BUILD.gn +++ b/third_party/libjingle/BUILD.gn @@ -491,6 +491,7 @@ if (enable_webrtc) { public_configs = [ ":jingle_public_configs" ] deps = [ + ":libjingle", "//third_party/libsrtp", "//third_party/webrtc/modules/media_file", "//third_party/webrtc/modules/video_capture", |