Revision: 21721
Author:   [email protected]
Date:     Fri Jun  6 14:30:33 2014 UTC
Log:      Port 'external startup data' flag from gyp to gn.

[email protected]
BUG=

Review URL: https://codereview.chromium.org/316363004
http://code.google.com/p/v8/source/detail?r=21721

Modified:
 /branches/bleeding_edge/BUILD.gn

=======================================
--- /branches/bleeding_edge/BUILD.gn    Fri Jun  6 07:26:23 2014 UTC
+++ /branches/bleeding_edge/BUILD.gn    Fri Jun  6 14:30:33 2014 UTC
@@ -218,10 +218,19 @@
     sources += [ "src/i18n.js" ]
   }

-  args =
-    rebase_path(outputs, root_build_dir) +
-    [ "CORE", v8_compress_startup_data ] +
-    rebase_path(sources, root_build_dir)
+  args = [
+    rebase_path("$target_gen_dir/libraries.cc", root_build_dir),
+    "CORE",
+    v8_compress_startup_data
+  ] + rebase_path(sources, root_build_dir)
+
+  if (v8_use_external_startup_data) {
+    outputs += [ "$target_gen_dir/libraries.bin" ]
+    args += [
+      "--startup_blob",
+      rebase_path("$target_gen_dir/libraries.bin", root_build_dir)
+    ]
+  }
 }

 action("js2c_experimental") {
@@ -250,10 +259,41 @@
     "$target_gen_dir/experimental-libraries.cc"
   ]

-  args =
-    rebase_path(outputs, root_build_dir) +
-    [ "EXPERIMENTAL", v8_compress_startup_data ] +
-    rebase_path(sources, root_build_dir)
+  args = [
+ rebase_path("$target_gen_dir/experimental-libraries.cc", root_build_dir),
+    "EXPERIMENTAL",
+    v8_compress_startup_data
+  ] + rebase_path(sources, root_build_dir)
+
+  if (v8_use_external_startup_data) {
+    outputs += [ "$target_gen_dir/libraries_experimental.bin" ]
+    args += [
+      "--startup_blob",
+ rebase_path("$target_gen_dir/libraries_experimental.bin", root_build_dir)
+    ]
+  }
+}
+
+action("natives_blob") {
+  visibility = ":*"  # Only targets in this file can depend on this.
+
+  deps = [
+    ":js2c",
+    ":js2c_experimental"
+  ]
+
+  sources = [
+    "$target_gen_dir/libraries.bin",
+    "$target_gen_dir/libraries_experimental.bin"
+  ]
+
+  outputs = [
+    "$root_gen_dir/natives_blob.bin"
+  ]
+
+  script = "tools/concatenate-files.py"
+
+  args = rebase_path(sources + outputs, root_build_dir)
 }

 action("postmortem-metadata") {
@@ -291,14 +331,21 @@
                                       "root_out_dir") + "/mksnapshot",
                        root_build_dir),
     "--log-snapshot-positions",
- "--logfile", rebase_path("$target_gen_dir/snapshot.log", root_build_dir) + "--logfile", rebase_path("$target_gen_dir/snapshot.log", root_build_dir),
+    rebase_path("$target_gen_dir/snapshot.cc", root_build_dir)
   ]

   if (v8_random_seed != "0") {
     args += [ "--random-seed", v8_random_seed ]
   }

-  args += rebase_path(outputs, root_build_dir)
+  if (v8_use_external_startup_data) {
+    outputs += [ "$root_gen_dir/snapshot_blob.bin" ]
+    args += [
+      "--startup_blob",
+      rebase_path("$root_gen_dir/snapshot_blob.bin", root_build_dir)
+    ]
+  }
 }


@@ -352,6 +399,29 @@
   configs += [ "//build/config/compiler:no_chromium_code" ]
   configs += [ ":internal_config", ":features", ":toolchain" ]
 }
+
+source_set("v8_external_snapshot") {
+  visibility = ":*"  # Only targets in this file can depend on this.
+
+  deps = [
+    ":js2c",
+    ":js2c_experimental",
+    ":generate_trig_table",
+    ":run_mksnapshot",
+    ":v8_base",
+    ":natives_blob",
+  ]
+
+  sources = [
+    "$target_gen_dir/trig-table.cc",
+    "src/natives-external.cc",
+    "src/snapshot-external.cc",
+  ]
+
+  configs -= [ "//build/config/compiler:chromium_code" ]
+  configs += [ "//build/config/compiler:no_chromium_code" ]
+  configs += [ ":internal_config", ":features", ":toolchain" ]
+}

 source_set("v8_base") {
   visibility = ":*"  # Only targets in this file can depend on this.
@@ -1024,7 +1094,12 @@
     "src/v8dll-main.cc",
   ]

-  if (v8_use_snapshot) {
+  if (v8_use_external_startup_data) {
+    deps = [
+      ":v8_base",
+      ":v8_external_snapshot",
+    ]
+  } else if (v8_use_snapshot) {
     deps = [
       ":v8_base",
       ":v8_snapshot",
@@ -1050,7 +1125,12 @@
 } else {

 group("v8") {
-  if (v8_use_snapshot) {
+  if (v8_use_external_startup_data) {
+    deps = [
+      ":v8_base",
+      ":v8_external_snapshot",
+    ]
+  } else if (v8_use_snapshot) {
     deps = [
       ":v8_base",
       ":v8_snapshot",

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