Make v8 snapshot public in component build.
authorbrettw <brettw@chromium.org>
Tue, 9 Jun 2015 08:36:09 +0000 (01:36 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 9 Jun 2015 08:36:16 +0000 (08:36 +0000)
This was already public in a non-component build. This means that targets
dependent on the "v8" target can take the results of the snapshot as inputs.

This also renames the component mode checking from keying off of the
component_mode string to checking the is_component_build flag, which is now the
recommended way to do this check.

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

Cr-Commit-Position: refs/heads/master@{#28856}

BUILD.gn

index cffd8f0..2f108d0 100644 (file)
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -52,7 +52,7 @@ config("internal_config") {
 
   include_dirs = [ "." ]
 
-  if (component_mode == "shared_library") {
+  if (is_component_build) {
     defines = [
       "V8_SHARED",
       "BUILDING_V8_SHARED",
@@ -1567,7 +1567,7 @@ if (current_toolchain == snapshot_toolchain) {
 # Public targets
 #
 
-if (component_mode == "shared_library") {
+if (is_component_build) {
   component("v8") {
     sources = [
       "src/v8dll-main.cc",
@@ -1576,6 +1576,8 @@ if (component_mode == "shared_library") {
     if (v8_use_snapshot && v8_use_external_startup_data) {
       deps = [
         ":v8_base",
+      ]
+      public_deps = [
         ":v8_external_snapshot",
       ]
     } else if (v8_use_snapshot) {
@@ -1672,7 +1674,7 @@ if ((current_toolchain == host_toolchain && v8_toolset_for_d8 == "host") ||
       sources += [ "src/d8-windows.cc" ]
     }
 
-    if (component_mode != "shared_library") {
+    if (!is_component_build) {
       sources += [
         "src/d8-debug.cc",
         "$target_gen_dir/d8-js.cc",