[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: Michael Achenbach <machenbach@chromium.org> Commit-Queue: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#60739}
This commit is contained in:
parent
30b2d668ef
commit
7ef5670a24
79
BUILD.gn
79
BUILD.gn
@ -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") {
|
|||||||
":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") {
|
|||||||
":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") {
|
|||||||
":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) {
|
|||||||
# 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") {
|
|||||||
### 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") {
|
|||||||
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") {
|
|||||||
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") {
|
|||||||
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") {
|
|||||||
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") {
|
|||||||
":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") {
|
|||||||
":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",
|
||||||
|
Loading…
Reference in New Issue
Block a user