Fix generated file dependencies for upcoming gn BUG= R=brettw@chromium.org, jamesr@chromium.org Review URL: https://codereview.chromium.org/1254963012 .
diff --git a/mojo/public/dart/rules.gni b/mojo/public/dart/rules.gni index ee35a26..6aa2477 100644 --- a/mojo/public/dart/rules.gni +++ b/mojo/public/dart/rules.gni
@@ -124,11 +124,11 @@ "--no-hints", ] - deps = [ + public_deps = [ ":${package_target_name}_package", ] if (defined(invoker.deps)) { - deps += invoker.deps + deps = invoker.deps } if (defined(invoker.datadeps)) {
diff --git a/mojo/public/mojo_application.gni b/mojo/public/mojo_application.gni index 32bdb7a..3b8aec8 100644 --- a/mojo/public/mojo_application.gni +++ b/mojo/public/mojo_application.gni
@@ -430,8 +430,13 @@ "--output=${rebase_output}", ] + deps = [ + ":${android_standalone_library_name}", + ":${shared_library_name}", + ] + if (defined(invoker.deps)) { - deps = invoker.deps + deps += invoker.deps } if (defined(invoker.public_deps)) { public_deps = invoker.public_deps
diff --git a/services/python/content_handler/BUILD.gn b/services/python/content_handler/BUILD.gn index b4ed987..ce7059e 100644 --- a/services/python/content_handler/BUILD.gn +++ b/services/python/content_handler/BUILD.gn
@@ -37,7 +37,10 @@ } copy("common_system_pxd") { - visibility = [ ":mojo_system_impl" ] + visibility = [ + ":mojo_system_impl", + ":mojo_system_impl_cython_compiler", + ] sources = [ "//mojo/public/python/c_async_waiter.pxd", "//mojo/public/python/c_export.pxd", @@ -59,7 +62,6 @@ "python_system_impl_helper.h", ] deps = [ - ":common_system_pxd", "//base", "//mojo/environment:chromium", "//mojo/common", @@ -69,4 +71,7 @@ "//mojo/public/cpp/bindings:callback", "//mojo/public/python:python_common", ] + public_deps = [ + ":common_system_pxd", + ] }
diff --git a/shell/BUILD.gn b/shell/BUILD.gn index 9cf9537..3a6917c 100644 --- a/shell/BUILD.gn +++ b/shell/BUILD.gn
@@ -333,6 +333,12 @@ "$root_out_dir/network_service.mojo", "$root_out_dir/obj/shell/bootstrap_java.dex.jar", ] + deps = [ + ":mojo_shell_child", + ":bootstrap", + ":bootstrap_java", + "//mojo/public/tools:copy_network_service", + ] } copy_ex("copy_mojo_shell_test_assets") { @@ -342,6 +348,10 @@ "$root_out_dir/test_app.mojo", "$root_out_dir/test_request_tracker_app.mojo", ] + deps = [ + "//services/test_service:test_app", + "//services/test_service:test_request_tracker_app", + ] } if (!is_official_build) { @@ -412,6 +422,7 @@ ":copy_mojo_shell_assets", ":java", ":mojo_shell", + ":mojo_shell_manifest", ":resources", "//base:base_java", "//services/native_viewport:native_viewport_java", @@ -497,14 +508,25 @@ } } +# Shared library propagation will happen up to executable, shared library, +# or complete static library boundaries. +# Workaround from brettw to prevent gn from linking pingable app into the +# apptests executable. +static_library("pingable_app_dummy") { + complete_static_lib = true + testonly = true + public_deps = [ + "//shell/test:pingable_app($default_toolchain)", + ] +} + embed_file("embed_pingable") { source = "$root_build_dir/pingable_app.mojo" namespace = "shell::test" variable = "kPingable" testonly = true - deps = [ - "//shell/test:pingable_app", + ":pingable_app_dummy", ] } @@ -562,6 +584,7 @@ deps = [ ":mojo_shell", + ":mojo_shell_child", ] if (is_android) { deps += [ ":bootstrap" ]
diff --git a/third_party/cython/rules.gni b/third_party/cython/rules.gni index ea6e0ae..f5a8fc4 100644 --- a/third_party/cython/rules.gni +++ b/third_party/cython/rules.gni
@@ -34,6 +34,12 @@ "-o", rebase_path(cython_output, root_build_dir), ] + rebase_path(sources, root_build_dir) + if (defined(invoker.deps)) { + deps = invoker.deps + } + if (defined(invoker.public_deps)) { + public_deps = invoker.public_deps + } } } @@ -74,6 +80,9 @@ if (defined(invoker.datadeps)) { datadeps = invoker.datadeps } + if (defined(invoker.public_deps)) { + public_deps = invoker.public_deps + } } }