Commit 7ef5670a authored by Jakob Gruber's avatar Jakob Gruber Committed by Commit Bot

[build] Refactor icu deps inclusion

Instead of adding conditionally everywhere, write the condition once
in v8_maybe_icu and include that. Essentially,

  if (v8_enable_i18n_support) {
    public_deps = [
      "//third_party/icu",
    ]
  }

becomes

  public_deps = [
    ":v8_maybe_icu",
  ]

Bug: v8:8834
Change-Id: I091b14c85f1495a967eaa2b272904fdf41e6e7eb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1532337
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60739}
parent 30b2d668
...@@ -1057,6 +1057,14 @@ action("run_torque") { ...@@ -1057,6 +1057,14 @@ action("run_torque") {
} }
} }
group("v8_maybe_icu") {
if (v8_enable_i18n_support) {
public_deps = [
"//third_party/icu",
]
}
}
v8_source_set("torque_generated_initializers") { v8_source_set("torque_generated_initializers") {
visibility = [ ":*" ] # Only targets in this file can depend on this. visibility = [ ":*" ] # Only targets in this file can depend on this.
...@@ -1065,11 +1073,9 @@ v8_source_set("torque_generated_initializers") { ...@@ -1065,11 +1073,9 @@ v8_source_set("torque_generated_initializers") {
":run_torque", ":run_torque",
] ]
if (v8_enable_i18n_support) { public_deps = [
public_deps = [ ":v8_maybe_icu",
"//third_party/icu", ]
]
}
sources = [] sources = []
foreach(namespace, torque_namespaces) { foreach(namespace, torque_namespaces) {
...@@ -1090,11 +1096,9 @@ v8_source_set("torque_generated_definitions") { ...@@ -1090,11 +1096,9 @@ v8_source_set("torque_generated_definitions") {
":run_torque", ":run_torque",
] ]
if (v8_enable_i18n_support) { public_deps = [
public_deps = [ ":v8_maybe_icu",
"//third_party/icu", ]
]
}
sources = [ sources = [
"$target_gen_dir/torque-generated/objects-printer-from-dsl.cc", "$target_gen_dir/torque-generated/objects-printer-from-dsl.cc",
...@@ -1345,11 +1349,9 @@ v8_source_set("v8_nosnapshot") { ...@@ -1345,11 +1349,9 @@ v8_source_set("v8_nosnapshot") {
":torque_generated_initializers", ":torque_generated_initializers",
] ]
if (v8_enable_i18n_support) { public_deps = [
public_deps = [ ":v8_maybe_icu",
"//third_party/icu", ]
]
}
sources = [ sources = [
"$target_gen_dir/extras-libraries.cc", "$target_gen_dir/extras-libraries.cc",
...@@ -1377,12 +1379,9 @@ if (v8_use_snapshot && !v8_use_external_startup_data) { ...@@ -1377,12 +1379,9 @@ if (v8_use_snapshot && !v8_use_external_startup_data) {
# This should be public so downstream targets can declare the snapshot # This should be public so downstream targets can declare the snapshot
# output file as their inputs. # output file as their inputs.
":run_mksnapshot_default", ":run_mksnapshot_default",
":v8_maybe_icu",
] ]
if (v8_enable_i18n_support) {
public_deps += [ "//third_party/icu" ]
}
# Do not publicize any header to remove build dependency. # Do not publicize any header to remove build dependency.
public = [] public = []
...@@ -1615,11 +1614,10 @@ v8_source_set("v8_init") { ...@@ -1615,11 +1614,10 @@ v8_source_set("v8_init") {
### gcmole(all) ### ### gcmole(all) ###
"src/setup-isolate-full.cc", "src/setup-isolate-full.cc",
] ]
if (v8_enable_i18n_support) {
public_deps = [ public_deps = [
"//third_party/icu", ":v8_maybe_icu",
] ]
}
configs = [ ":internal_config" ] configs = [ ":internal_config" ]
} }
...@@ -1903,12 +1901,9 @@ v8_source_set("v8_compiler_opt") { ...@@ -1903,12 +1901,9 @@ v8_source_set("v8_compiler_opt") {
public_deps = [ public_deps = [
":generate_bytecode_builtins_list", ":generate_bytecode_builtins_list",
":run_torque", ":run_torque",
":v8_maybe_icu",
] ]
if (v8_enable_i18n_support) {
public_deps += [ "//third_party/icu" ]
}
if (is_debug && !v8_optimized_debug && v8_enable_fast_mksnapshot) { if (is_debug && !v8_optimized_debug && v8_enable_fast_mksnapshot) {
# The :no_optimize config is added to v8_add_configs in v8.gni. # The :no_optimize config is added to v8_add_configs in v8.gni.
remove_configs = [ "//build/config/compiler:no_optimize" ] remove_configs = [ "//build/config/compiler:no_optimize" ]
...@@ -1930,12 +1925,9 @@ v8_source_set("v8_compiler") { ...@@ -1930,12 +1925,9 @@ v8_source_set("v8_compiler") {
public_deps = [ public_deps = [
":generate_bytecode_builtins_list", ":generate_bytecode_builtins_list",
":run_torque", ":run_torque",
":v8_maybe_icu",
] ]
if (v8_enable_i18n_support) {
public_deps += [ "//third_party/icu" ]
}
configs = [ ":internal_config" ] configs = [ ":internal_config" ]
} }
...@@ -3211,10 +3203,10 @@ v8_source_set("v8_base_without_compiler") { ...@@ -3211,10 +3203,10 @@ v8_source_set("v8_base_without_compiler") {
public_deps = [ public_deps = [
":generate_bytecode_builtins_list", ":generate_bytecode_builtins_list",
":run_torque", ":run_torque",
":v8_maybe_icu",
] ]
if (v8_enable_i18n_support) { if (v8_enable_i18n_support) {
public_deps += [ "//third_party/icu" ]
if (is_win) { if (is_win) {
deps += [ "//third_party/icu:icudata" ] deps += [ "//third_party/icu:icudata" ]
} }
...@@ -3634,11 +3626,8 @@ v8_source_set("fuzzer_support") { ...@@ -3634,11 +3626,8 @@ v8_source_set("fuzzer_support") {
public_deps = [ public_deps = [
":v8_libbase", ":v8_libbase",
":v8_libplatform", ":v8_libplatform",
":v8_maybe_icu",
] ]
if (v8_enable_i18n_support) {
public_deps += [ "//third_party/icu" ]
}
} }
############################################################################### ###############################################################################
...@@ -4151,11 +4140,9 @@ v8_source_set("wasm_module_runner") { ...@@ -4151,11 +4140,9 @@ v8_source_set("wasm_module_runner") {
":run_torque", ":run_torque",
] ]
if (v8_enable_i18n_support) { public_deps = [
public_deps = [ ":v8_maybe_icu",
"//third_party/icu", ]
]
}
configs = [ configs = [
":external_config", ":external_config",
...@@ -4235,11 +4222,9 @@ v8_source_set("lib_wasm_fuzzer_common") { ...@@ -4235,11 +4222,9 @@ v8_source_set("lib_wasm_fuzzer_common") {
":run_torque", ":run_torque",
] ]
if (v8_enable_i18n_support) { public_deps = [
public_deps = [ ":v8_maybe_icu",
"//third_party/icu", ]
]
}
configs = [ configs = [
":external_config", ":external_config",
......
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