diff options
author | sky <sky@chromium.org> | 2015-07-27 12:19:48 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-07-27 19:20:43 +0000 |
commit | 67b0a7be4ff751b1cf83be5af817a61ff7154aa8 (patch) | |
tree | ebb0fb19391993b8beef707137d8411f85dbf8f6 | |
parent | 0f2ef35a2de53103f42a7ab62ccc07aa34481e41 (diff) | |
download | chromium_src-67b0a7be4ff751b1cf83be5af817a61ff7154aa8.zip chromium_src-67b0a7be4ff751b1cf83be5af817a61ff7154aa8.tar.gz chromium_src-67b0a7be4ff751b1cf83be5af817a61ff7154aa8.tar.bz2 |
Gets gn check to execute cleanly in mojo/common
This one is trickier. I'm changing mojo/common:common_base to be a
source_set. Here's why. When I add the necessary deps, in particular
"//third_party/mojo/src/mojo/public/cpp/bindings:bindings",
then I get link errors for the environment, eg
gen/third_party/mojo/src/mojo/public/interfaces/bindings/interface_control_messages.mojom.cc:719: error: undefined reference to 'mojo::Environment::GetDefaultLogger()'
These symbols are in //mojo/environment. If I add //mojo/environment
to the list of deps for common_base I end up with a cycle as
environment depends upon common_base. By changing to source_set
common_base isn't linked and everyone is happy.
As a result of this I had to consolidate //mojo/environment into a single source set.
BUG=none
TEST=none
R=ben@chromium.org
Review URL: https://codereview.chromium.org/1256593003
Cr-Commit-Position: refs/heads/master@{#340527}
-rw-r--r-- | .gn | 4 | ||||
-rw-r--r-- | mojo/common/BUILD.gn | 4 | ||||
-rw-r--r-- | mojo/environment/BUILD.gn | 40 |
3 files changed, 16 insertions, 32 deletions
@@ -75,9 +75,7 @@ check_targets = [ "mojo/application/*", "mojo/build/*", "mojo/cc/*", - - # TODO(sky): resolve this. - # "mojo/common/*", + "mojo/common/*", "mojo/converters/*", "mojo/environment/*", diff --git a/mojo/common/BUILD.gn b/mojo/common/BUILD.gn index 1548798..6499e72 100644 --- a/mojo/common/BUILD.gn +++ b/mojo/common/BUILD.gn @@ -12,7 +12,7 @@ group("common") { } # GYP version: mojo/mojo_base.gyp:mojo_common_lib -component("common_base") { +source_set("common_base") { output_name = "mojo_common_lib" sources = [ @@ -40,6 +40,8 @@ component("common_base") { "//base", "//base/third_party/dynamic_annotations", "//third_party/mojo/src/mojo/public/c/system:for_component", + "//third_party/mojo/src/mojo/public/cpp/bindings:bindings", + "//third_party/mojo/src/mojo/public/cpp/system:system", ] } diff --git a/mojo/environment/BUILD.gn b/mojo/environment/BUILD.gn index 9621dfb..6b6f6eb 100644 --- a/mojo/environment/BUILD.gn +++ b/mojo/environment/BUILD.gn @@ -7,6 +7,14 @@ source_set("chromium") { output_name = "mojo_environment_chromium" sources = [ + "default_async_waiter_impl.cc", + "default_async_waiter_impl.h", + "default_logger_impl.cc", + "default_logger_impl.h", + "default_run_loop_impl.cc", + "default_run_loop_impl.h", + "default_task_tracker_impl.cc", + "default_task_tracker_impl.h", "environment.cc", # TODO(vtl): This is kind of ugly. (See TODO in logging.h.) @@ -19,43 +27,19 @@ source_set("chromium") { "//third_party/mojo/src/mojo/public/cpp/environment/task_tracker.h", ] - public_deps = [ - ":chromium_impl", - ] - deps = [ + "//base", + "//base/third_party/dynamic_annotations", + "//mojo/common:common_base", + "//third_party/mojo/src/mojo/public/cpp/environment:environment", "//third_party/mojo/src/mojo/public/c/environment", "//third_party/mojo/src/mojo/public/cpp/bindings:callback", "//third_party/mojo/src/mojo/public/cpp/environment", "//third_party/mojo/src/mojo/public/cpp/system", ] -} - -# GYP version: mojo_base.gyp:mojo_environment_chromium_impl -component("chromium_impl") { - output_name = "mojo_environment_impl" - visibility = [ "//mojo/*" ] - - sources = [ - "default_async_waiter_impl.cc", - "default_async_waiter_impl.h", - "default_logger_impl.cc", - "default_logger_impl.h", - "default_run_loop_impl.cc", - "default_run_loop_impl.h", - "default_task_tracker_impl.cc", - "default_task_tracker_impl.h", - ] defines = [ "MOJO_ENVIRONMENT_IMPL_IMPLEMENTATION" ] public_configs = [ "//third_party/mojo/src/mojo/public/build/config:mojo_sdk" ] - - deps = [ - "//base", - "//base/third_party/dynamic_annotations", - "//mojo/common:common_base", - "//third_party/mojo/src/mojo/public/cpp/environment:environment", - ] } |