[build] Link V8 as component in static library builds
BUG=v8:5435 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_chromium_compile_dbg_ng;master.tryserver.chromium.android:android_clang_dbg_recipe Review-Url: https://codereview.chromium.org/2373783002 Cr-Commit-Position: refs/heads/master@{#41304}
This commit is contained in:
parent
195754cf31
commit
1f74f551d0
1
BUILD.gn
1
BUILD.gn
@ -2516,6 +2516,7 @@ if (is_component_build) {
|
||||
":v8_base",
|
||||
":v8_maybe_snapshot",
|
||||
]
|
||||
|
||||
public_configs = [ ":external_config" ]
|
||||
}
|
||||
}
|
||||
|
@ -18,3 +18,8 @@ v8_experimental_extra_library_files =
|
||||
[ "//test/cctest/test-experimental-extra.js" ]
|
||||
|
||||
v8_enable_inspector_override = true
|
||||
|
||||
declare_args() {
|
||||
# Use static libraries instead of source_sets.
|
||||
v8_static_library = false
|
||||
}
|
||||
|
19
gni/v8.gni
19
gni/v8.gni
@ -87,11 +87,20 @@ if (is_posix && v8_enable_backtrace) {
|
||||
|
||||
# All templates should be kept in sync.
|
||||
template("v8_source_set") {
|
||||
source_set(target_name) {
|
||||
forward_variables_from(invoker, "*", [ "configs" ])
|
||||
configs += invoker.configs
|
||||
configs -= v8_remove_configs
|
||||
configs += v8_add_configs
|
||||
if (defined(v8_static_library) && v8_static_library) {
|
||||
static_library(target_name) {
|
||||
forward_variables_from(invoker, "*", [ "configs" ])
|
||||
configs += invoker.configs
|
||||
configs -= v8_remove_configs
|
||||
configs += v8_add_configs
|
||||
}
|
||||
} else {
|
||||
source_set(target_name) {
|
||||
forward_variables_from(invoker, "*", [ "configs" ])
|
||||
configs += invoker.configs
|
||||
configs -= v8_remove_configs
|
||||
configs += v8_add_configs
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user