Revision: 21689
Author: [email protected]
Date: Thu Jun 5 08:45:24 2014 UTC
Log: Address a few TODOs in the gn config
- add direct dependant settings
- only compile mksnapshot on the host toolset
BUG=none
LOG=n
[email protected], [email protected]
Review URL: https://codereview.chromium.org/314073002
http://code.google.com/p/v8/source/detail?r=21689
Modified:
/branches/bleeding_edge/BUILD.gn
=======================================
--- /branches/bleeding_edge/BUILD.gn Wed Jun 4 15:21:26 2014 UTC
+++ /branches/bleeding_edge/BUILD.gn Thu Jun 5 08:45:24 2014 UTC
@@ -31,10 +31,22 @@
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 @@
# 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",
- ]
+ sources = [
+ "src/mksnapshot.cc",
+ ]
- configs -= [ "//build/config/compiler:chromium_code" ]
- configs += [ "//build/config/compiler:no_chromium_code" ]
- configs += [ ":internal_config", ":features", ":toolchain" ]
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [ "//build/config/compiler:no_chromium_code" ]
+ configs += [ ":internal_config", ":features", ":toolchain" ]
- deps = [
- ":v8_base",
- ":v8_nosnapshot",
- ]
+ deps = [
+ ":v8_base",
+ ":v8_nosnapshot",
+ ]
- libs = []
-
- if (v8_compress_startup_data == "bz2") {
- libs += [ "bz2" ]
- }
-
- if (is_android && current_toolchain != host_toolchain) {
- libs += [ "log" ]
+ if (v8_compress_startup_data == "bz2") {
+ libs = [ "bz2" ]
+ }
}
}
@@ -1014,7 +1022,11 @@
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 @@
":v8_nosnapshot",
]
}
- # TODO(jochen): Support direct dependent configs.
+
+ direct_dependent_configs = [ ":external_config" ]
}
}
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.