Reviewers: brettw, Michael Achenbach,

Description:
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]

Please review this at https://codereview.chromium.org/314073002/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+23, -8 lines):
  M BUILD.gn


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) {
+
 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" ]
 }

 }


--
--
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.

Reply via email to