Commit d208d2f6 authored by jochen@chromium.org's avatar jochen@chromium.org

Address a few TODOs in the gn config

- add direct dependant settings
- only compile mksnapshot on the host toolset

BUG=none
LOG=n
R=machenbach@chromium.org, brettw@chromium.org

Review URL: https://codereview.chromium.org/314073002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21689 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent a83b1b9c
......@@ -31,10 +31,22 @@ config("internal_config") {
if (component_mode == "shared_library") {
defines = [
"V8_SHARED",
"BUILDING_V8_SHARED",
]
}
}
# This config should only be applied to code using V8 and not any V8 code
# itself.
config("external_config") {
if (is_component_build) {
defines = [
"V8_SHARED",
"USING_V8_SHARED",
]
}
include_dirs = [ "include" ]
}
config("features") {
......@@ -960,30 +972,26 @@ source_set("v8_libbase") {
# Executables
#
executable("mksnapshot") {
visibility = ":*" # Only targets in this file can depend on this.
if (current_toolchain == host_toolchain) {
executable("mksnapshot") {
visibility = ":*" # Only targets in this file can depend on this.
sources = [
"src/mksnapshot.cc",
]
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [ "//build/config/compiler:no_chromium_code" ]
configs += [ ":internal_config", ":features", ":toolchain" ]
deps = [
":v8_base",
":v8_nosnapshot",
]
sources = [
"src/mksnapshot.cc",
]
libs = []
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [ "//build/config/compiler:no_chromium_code" ]
configs += [ ":internal_config", ":features", ":toolchain" ]
if (v8_compress_startup_data == "bz2") {
libs += [ "bz2" ]
}
deps = [
":v8_base",
":v8_nosnapshot",
]
if (is_android && current_toolchain != host_toolchain) {
libs += [ "log" ]
if (v8_compress_startup_data == "bz2") {
libs = [ "bz2" ]
}
}
}
......@@ -1014,7 +1022,11 @@ component("v8") {
configs += [ "//build/config/compiler:no_chromium_code" ]
configs += [ ":internal_config", ":features", ":toolchain" ]
# TODO(jochen): Support direct dependent configs.
direct_dependent_configs = [ ":external_config" ]
if (is_android && current_toolchain != host_toolchain) {
libs += [ "log" ]
}
}
} else {
......@@ -1031,7 +1043,8 @@ group("v8") {
":v8_nosnapshot",
]
}
# TODO(jochen): Support direct dependent configs.
direct_dependent_configs = [ ":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