[gn] Add v8_monolith static library target.
R=machenbach@chromium.org Bug: v8:6105 Change-Id: I51d7d38897d1b20469304345d11228a8f78d3489 Reviewed-on: https://chromium-review.googlesource.com/788376 Commit-Queue: Yang Guo <yangguo@chromium.org> Reviewed-by: Michael Achenbach <machenbach@chromium.org> Cr-Commit-Position: refs/heads/master@{#49627}
This commit is contained in:
parent
ffbbc49276
commit
925ed598e3
26
BUILD.gn
26
BUILD.gn
@ -132,6 +132,8 @@ declare_args() {
|
||||
# Temporary flag to allow embedders to update their microtasks scopes
|
||||
# while rolling in a new version of V8.
|
||||
v8_check_microtasks_scopes_consistency = ""
|
||||
|
||||
v8_monolithic = false
|
||||
}
|
||||
|
||||
# Derived defaults.
|
||||
@ -2680,6 +2682,30 @@ v8_source_set("fuzzer_support") {
|
||||
]
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
# Produce a single static library for embedders
|
||||
#
|
||||
|
||||
if (v8_monolithic) {
|
||||
# A component build is not monolithic.
|
||||
assert(!is_component_build)
|
||||
|
||||
# Using external startup data would produce separate files.
|
||||
assert(!v8_use_external_startup_data)
|
||||
v8_static_library("v8_monolith") {
|
||||
deps = [
|
||||
":v8",
|
||||
":v8_libbase",
|
||||
":v8_libplatform",
|
||||
":v8_libsampler",
|
||||
"//build/config:exe_and_shlib_deps",
|
||||
"//build/win:default_exe_manifest",
|
||||
]
|
||||
|
||||
configs = [ ":internal_config" ]
|
||||
}
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
# Executables
|
||||
#
|
||||
|
10
gni/v8.gni
10
gni/v8.gni
@ -174,3 +174,13 @@ template("v8_component") {
|
||||
configs += v8_add_configs
|
||||
}
|
||||
}
|
||||
|
||||
template("v8_static_library") {
|
||||
static_library(target_name) {
|
||||
complete_static_lib = true
|
||||
forward_variables_from(invoker, "*", [ "configs" ])
|
||||
configs += invoker.configs
|
||||
configs -= v8_remove_configs
|
||||
configs += v8_add_configs
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user