Use public_deps for v8_base in GN.
The previous code took advantage of the fact that a group's deps are implicitly public, but I'm trying to fix that. This also cleans up some duplicated code between component and non-component builds. Review URL: https://codereview.chromium.org/1356723002 Cr-Commit-Position: refs/heads/master@{#30820}
This commit is contained in:
parent
491b9e29a0
commit
cb2c22321f
60
BUILD.gn
60
BUILD.gn
@ -1747,35 +1747,25 @@ if (current_toolchain == snapshot_toolchain) {
|
|||||||
# Public targets
|
# Public targets
|
||||||
#
|
#
|
||||||
|
|
||||||
|
if (v8_use_snapshot && v8_use_external_startup_data) {
|
||||||
|
snapshot_target = ":v8_external_snapshot"
|
||||||
|
} else if (v8_use_snapshot) {
|
||||||
|
snapshot_target = ":v8_snapshot"
|
||||||
|
} else {
|
||||||
|
assert(!v8_use_external_startup_data)
|
||||||
|
snapshot_target = ":v8_nosnapshot"
|
||||||
|
}
|
||||||
|
|
||||||
if (is_component_build) {
|
if (is_component_build) {
|
||||||
component("v8") {
|
component("v8") {
|
||||||
sources = [
|
sources = [
|
||||||
"src/v8dll-main.cc",
|
"src/v8dll-main.cc",
|
||||||
]
|
]
|
||||||
|
|
||||||
if (v8_use_snapshot && v8_use_external_startup_data) {
|
public_deps = [
|
||||||
deps = [
|
":v8_base",
|
||||||
":v8_base",
|
snapshot_target,
|
||||||
]
|
]
|
||||||
public_deps = [
|
|
||||||
":v8_external_snapshot",
|
|
||||||
]
|
|
||||||
} else if (v8_use_snapshot) {
|
|
||||||
deps = [
|
|
||||||
":v8_base",
|
|
||||||
]
|
|
||||||
# v8_snapshot should be public so downstream targets can declare the
|
|
||||||
# snapshot file as their input.
|
|
||||||
public_deps = [
|
|
||||||
":v8_snapshot",
|
|
||||||
]
|
|
||||||
} else {
|
|
||||||
assert(!v8_use_external_startup_data)
|
|
||||||
deps = [
|
|
||||||
":v8_base",
|
|
||||||
":v8_nosnapshot",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
configs -= [ "//build/config/compiler:chromium_code" ]
|
configs -= [ "//build/config/compiler:chromium_code" ]
|
||||||
configs += [ "//build/config/compiler:no_chromium_code" ]
|
configs += [ "//build/config/compiler:no_chromium_code" ]
|
||||||
@ -1794,26 +1784,10 @@ if (is_component_build) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
group("v8") {
|
group("v8") {
|
||||||
if (v8_use_snapshot && v8_use_external_startup_data) {
|
public_deps = [
|
||||||
deps = [
|
":v8_base",
|
||||||
":v8_base",
|
snapshot_target,
|
||||||
":v8_external_snapshot",
|
]
|
||||||
]
|
|
||||||
} else if (v8_use_snapshot) {
|
|
||||||
deps = [
|
|
||||||
":v8_base",
|
|
||||||
]
|
|
||||||
public_deps = [
|
|
||||||
":v8_snapshot",
|
|
||||||
]
|
|
||||||
} else {
|
|
||||||
assert(!v8_use_external_startup_data)
|
|
||||||
deps = [
|
|
||||||
":v8_base",
|
|
||||||
":v8_nosnapshot",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
public_configs = [ ":external_config" ]
|
public_configs = [ ":external_config" ]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user