Commit e97185bf authored by brettw's avatar brettw Committed by Commit bot

Revert of Fix missing GN dependencies. (patchset #4 id:60001 of...

Revert of Fix missing GN dependencies. (patchset #4 id:60001 of https://codereview.chromium.org/1128163007/)

Reason for revert:
Broke Windows:
http://build.chromium.org/p/chromium.win/builders/Win%20x64%20GN/builds/1568/steps/compile/logs/stdio

Original issue's description:
> Fix missing GN dependencies.
>
> Fixes some cases where a dependency between a target's inputs and outputs exists without an explicit dependency.
>
> json_schema_api.gni was generating wrong names, this was fixed.
>
> mojo_application_package.gni was fixed to generate unique names (just a bug I noticed in passing) and support the testonly flag, which is necessary when I added the correct dependency.
>
> The rest of the cases are just adding deps or making existing deps public so that the ability to depend on the target's outputs is passed to dependents.
>
> BUG=487897
>
> Committed: https://crrev.com/eadea21096be21b0d74c93f5b1a0ae6a9cc057d7
> Cr-Commit-Position: refs/heads/master@{#330636}

TBR=dpranke@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=487897

Review URL: https://codereview.chromium.org/1137693006

Cr-Commit-Position: refs/heads/master@{#330650}
parent b2a22fab
...@@ -154,9 +154,7 @@ template("json_schema_api") { ...@@ -154,9 +154,7 @@ template("json_schema_api") {
assert(defined(invoker.impl_dir), assert(defined(invoker.impl_dir),
"\"impl_dir\" must be defined for the $target_name template.") "\"impl_dir\" must be defined for the $target_name template.")
impl_dir = invoker.impl_dir
# Child directory inside the generated file tree.
gen_child_dir = rebase_path(invoker.impl_dir, "//")
bundle_generator_registration_name = bundle_generator_registration_name =
target_name + "_bundle_generator_registration" target_name + "_bundle_generator_registration"
...@@ -164,15 +162,15 @@ template("json_schema_api") { ...@@ -164,15 +162,15 @@ template("json_schema_api") {
script = compiler_script script = compiler_script
inputs = compiler_sources + invoker.sources + uncompiled_sources inputs = compiler_sources + invoker.sources + uncompiled_sources
outputs = [ outputs = [
"$root_gen_dir/$gen_child_dir/generated_api_registration.cc", "$root_gen_dir/$impl_dir/generated_api_registration.cc",
"$root_gen_dir/$gen_child_dir/generated_api_registration.h", "$root_gen_dir/$impl_dir/generated_api_registration.h",
] ]
args = [ args = [
"--root=" + rebase_path("//", root_build_dir), "--root=" + rebase_path("//", root_build_dir),
"--destdir=" + rebase_path(root_gen_dir, root_build_dir), "--destdir=" + rebase_path(root_gen_dir, root_build_dir),
"--namespace=$root_namespace", "--namespace=$root_namespace",
"--generator=cpp-bundle-registration", "--generator=cpp-bundle-registration",
"--impl-dir=$gen_child_dir", "--impl-dir=" + rebase_path(impl_dir, "//"),
"--include-rules=$schema_include_rules", "--include-rules=$schema_include_rules",
] + rebase_path(invoker.sources, root_build_dir) + ] + rebase_path(invoker.sources, root_build_dir) +
rebase_path(uncompiled_sources, root_build_dir) rebase_path(uncompiled_sources, root_build_dir)
......
...@@ -445,11 +445,9 @@ template("grit") { ...@@ -445,11 +445,9 @@ template("grit") {
# depend on us. # depend on us.
sources = grit_outputs sources = grit_outputs
# Deps set on the template invocation will go on the action that runs # Deps set on the template invocation will go on the grit script running
# grit above rather than this library. This target needs to depend on the # target rather than this library.
# action publicly so other scripts can take the outputs from the grit deps = [
# script as inputs.
public_deps = [
":$grit_custom_target", ":$grit_custom_target",
] ]
public_configs = [ ":$grit_config" ] public_configs = [ ":$grit_config" ]
......
...@@ -535,11 +535,6 @@ repack("packed_extra_resources") { ...@@ -535,11 +535,6 @@ repack("packed_extra_resources") {
"$root_gen_dir/content/browser/tracing/tracing_resources.pak", "$root_gen_dir/content/browser/tracing/tracing_resources.pak",
"$root_gen_dir/content/content_resources.pak", "$root_gen_dir/content/content_resources.pak",
] ]
deps += [
"//content:resources",
"//content/browser/tracing:resources",
"//third_party/WebKit/public:resources",
]
} }
if (is_chromeos) { if (is_chromeos) {
sources += [ "$root_gen_dir/ui/file_manager/file_manager_resources.pak" ] sources += [ "$root_gen_dir/ui/file_manager/file_manager_resources.pak" ]
...@@ -553,10 +548,7 @@ repack("packed_extra_resources") { ...@@ -553,10 +548,7 @@ repack("packed_extra_resources") {
"$root_gen_dir/extensions/extensions_renderer_resources.pak", "$root_gen_dir/extensions/extensions_renderer_resources.pak",
"$root_gen_dir/extensions/extensions_resources.pak", "$root_gen_dir/extensions/extensions_resources.pak",
] ]
deps += [ deps += [ "//chrome/common:extensions_api_resources" ]
"//chrome/common:extensions_api_resources",
"//extensions:extensions_resources",
]
} }
# GYP outputs the file in the gen/repack directory. On non-Mac/iOS platforms # GYP outputs the file in the gen/repack directory. On non-Mac/iOS platforms
...@@ -575,9 +567,6 @@ repack("browser_tests_pak") { ...@@ -575,9 +567,6 @@ repack("browser_tests_pak") {
"$root_gen_dir/chrome/options_test_resources.pak", "$root_gen_dir/chrome/options_test_resources.pak",
] ]
output = "$root_out_dir/browser_tests.pak" output = "$root_out_dir/browser_tests.pak"
deps = [
"//chrome/browser/resources:options_test_resources",
]
} }
# Collects per-locale grit files from many sources into global per-locale files. # Collects per-locale grit files from many sources into global per-locale files.
...@@ -640,10 +629,8 @@ template("chrome_repack_percent") { ...@@ -640,10 +629,8 @@ template("chrome_repack_percent") {
deps = [ deps = [
"//chrome/app/theme:theme_resources", "//chrome/app/theme:theme_resources",
"//chrome/renderer:resources", "//chrome/renderer:resources",
"//components/resources",
"//components/strings", "//components/strings",
"//net:net_resources", "//net:net_resources",
"//ui/resources",
] ]
if (!is_ios) { if (!is_ios) {
...@@ -651,10 +638,7 @@ template("chrome_repack_percent") { ...@@ -651,10 +638,7 @@ template("chrome_repack_percent") {
"$root_gen_dir/blink/public/resources/blink_image_resources_${percent}_percent.pak", "$root_gen_dir/blink/public/resources/blink_image_resources_${percent}_percent.pak",
"$root_gen_dir/content/app/resources/content_resources_${percent}_percent.pak", "$root_gen_dir/content/app/resources/content_resources_${percent}_percent.pak",
] ]
deps += [ deps += [ "//content:resources" ]
"//content/app/resources",
"//third_party/WebKit/public:image_resources",
]
} }
if (use_ash) { if (use_ash) {
sources += sources +=
...@@ -667,7 +651,6 @@ template("chrome_repack_percent") { ...@@ -667,7 +651,6 @@ template("chrome_repack_percent") {
} }
if (enable_extensions) { if (enable_extensions) {
sources += [ "$root_gen_dir/extensions/extensions_browser_resources_${percent}_percent.pak" ] sources += [ "$root_gen_dir/extensions/extensions_browser_resources_${percent}_percent.pak" ]
deps += [ "//extensions:extensions_browser_resources" ]
} }
output = repack_output_file output = repack_output_file
......
...@@ -158,9 +158,6 @@ action("make_generated_resources_map") { ...@@ -158,9 +158,6 @@ action("make_generated_resources_map") {
# specifying it manually. This doesn't happen in the GYP build. # specifying it manually. This doesn't happen in the GYP build.
source_set("generated_resources_map") { source_set("generated_resources_map") {
sources = get_target_outputs(":make_generated_resources_map") sources = get_target_outputs(":make_generated_resources_map")
deps = [
":make_generated_resources_map",
]
} }
# GYP version: chrome/chrome_resources.gyp:chrome_strings # GYP version: chrome/chrome_resources.gyp:chrome_strings
......
...@@ -851,7 +851,6 @@ grit("resources") { ...@@ -851,7 +851,6 @@ grit("resources") {
deps = [ deps = [
":about_credits", ":about_credits",
":chrome_internal_resources_gen", ":chrome_internal_resources_gen",
"//chrome/browser/ui/webui/omnibox:mojo_bindings",
] ]
inputs = [ inputs = [
omnibox_mojom_file, omnibox_mojom_file,
......
...@@ -100,7 +100,6 @@ component("libgtk2ui") { ...@@ -100,7 +100,6 @@ component("libgtk2ui") {
"//chrome:strings", "//chrome:strings",
"//components/resources", "//components/resources",
"//content/public/browser", "//content/public/browser",
"//mojo/environment:chromium",
"//printing", "//printing",
"//skia", "//skia",
"//third_party/mojo/src/mojo/edk/system", "//third_party/mojo/src/mojo/edk/system",
......
...@@ -95,7 +95,6 @@ source_set("automation_client_lib") { ...@@ -95,7 +95,6 @@ source_set("automation_client_lib") {
sources += get_target_outputs(":embed_user_data_dir_in_cpp") sources += get_target_outputs(":embed_user_data_dir_in_cpp")
deps = [ deps = [
":embed_extension_in_cpp",
":embed_js_in_cpp", ":embed_js_in_cpp",
":embed_user_data_dir_in_cpp", ":embed_user_data_dir_in_cpp",
"//base", "//base",
......
...@@ -197,7 +197,6 @@ mojo_application_package("html_viewer") { ...@@ -197,7 +197,6 @@ mojo_application_package("html_viewer") {
"$root_build_dir/natives_blob.bin", "$root_build_dir/natives_blob.bin",
"$root_build_dir/snapshot_blob.bin", "$root_build_dir/snapshot_blob.bin",
] ]
deps += [ "//gin" ]
} }
} }
......
...@@ -120,7 +120,6 @@ repack("shell_and_test_pak") { ...@@ -120,7 +120,6 @@ repack("shell_and_test_pak") {
deps = [ deps = [
":extensions_resources", ":extensions_resources",
"//content:resources", "//content:resources",
"//content/app/strings",
"//content/browser/devtools:devtools_resources", "//content/browser/devtools:devtools_resources",
"//content/shell:resources", "//content/shell:resources",
"//extensions/shell:resources", "//extensions/shell:resources",
......
...@@ -76,8 +76,10 @@ component("gin") { ...@@ -76,8 +76,10 @@ component("gin") {
"//base/third_party/dynamic_annotations", "//base/third_party/dynamic_annotations",
] ]
if (v8_use_external_startup_data && is_win) { if (v8_use_external_startup_data && is_win) {
public_deps += [ ":gin_v8_snapshot_fingerprint" ] deps += [
deps += [ "//crypto:crypto" ] ":gin_v8_snapshot_fingerprint",
"//crypto:crypto",
]
sources += [ "$target_gen_dir/v8_snapshot_fingerprint.cc" ] sources += [ "$target_gen_dir/v8_snapshot_fingerprint.cc" ]
defines += [ "V8_VERIFY_EXTERNAL_STARTUP_DATA" ] defines += [ "V8_VERIFY_EXTERNAL_STARTUP_DATA" ]
} }
...@@ -106,10 +108,6 @@ if (v8_use_external_startup_data) { ...@@ -106,10 +108,6 @@ if (v8_use_external_startup_data) {
outputs = [ outputs = [
output_file, output_file,
] ]
deps = [
"//v8",
]
} }
} }
......
...@@ -20,18 +20,13 @@ template("mojo_application_package") { ...@@ -20,18 +20,13 @@ template("mojo_application_package") {
output_name = invoker.output_name output_name = invoker.output_name
} }
copy_step_name = "${target_name}__copy_resources" copy("copy_mojo_application_resources") {
copy(copy_step_name) {
sources = invoker.resources sources = invoker.resources
outputs = [ outputs = [
"$root_out_dir/$output_name/resources/{{source_file_part}}", "$root_out_dir/$output_name/resources/{{source_file_part}}",
] ]
if (defined(invoker.testonly)) {
testonly = invoker.testonly
}
deps = mojo_deps
} }
mojo_deps += [ ":$copy_step_name" ] mojo_deps += [ ":copy_mojo_application_resources" ]
} }
mojo_native_application(target_name) { mojo_native_application(target_name) {
......
...@@ -77,7 +77,7 @@ if (!is_mac) { ...@@ -77,7 +77,7 @@ if (!is_mac) {
# (copy_ui_test_pak action) # (copy_ui_test_pak action)
if (is_ios || is_mac) { if (is_ios || is_mac) {
group("ui_test_pak") { group("ui_test_pak") {
public_deps = [ deps = [
":repack_ui_test_pak", ":repack_ui_test_pak",
":repack_ui_test_mac_locale_pack", ":repack_ui_test_mac_locale_pack",
] ]
...@@ -90,7 +90,7 @@ if (is_ios || is_mac) { ...@@ -90,7 +90,7 @@ if (is_ios || is_mac) {
outputs = [ outputs = [
"$root_out_dir/ui/en-US.pak", "$root_out_dir/ui/en-US.pak",
] ]
public_deps = [ deps = [
":repack_ui_test_pak", ":repack_ui_test_pak",
] ]
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment