Index: BUILD.gn |
diff --git a/BUILD.gn b/BUILD.gn |
index 2fe4579f15e73e132de3f4f652642ec52f519229..b2d0bfe90fc36cf9d5d0874f280422112957b27c 100644 |
--- a/BUILD.gn |
+++ b/BUILD.gn |
@@ -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,6 +972,8 @@ source_set("v8_libbase") { |
# Executables |
# |
+if (current_toolchain == host_toolchain) { |
Michael Achenbach
2014/06/05 08:24:35
nit: no indentation on that level is normal?
|
+ |
executable("mksnapshot") { |
visibility = ":*" # Only targets in this file can depend on this. |
@@ -976,15 +990,11 @@ executable("mksnapshot") { |
":v8_nosnapshot", |
] |
- libs = [] |
- |
if (v8_compress_startup_data == "bz2") { |
- libs += [ "bz2" ] |
+ libs = [ "bz2" ] |
} |
+} |
- if (is_android && current_toolchain != host_toolchain) { |
- libs += [ "log" ] |
- } |
} |
############################################################################### |
@@ -1014,7 +1024,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 +1045,8 @@ group("v8") { |
":v8_nosnapshot", |
] |
} |
- # TODO(jochen): Support direct dependent configs. |
+ |
+ direct_dependent_configs = [ ":external_config" ] |
} |
} |