Index: BUILD.gn |
diff --git a/BUILD.gn b/BUILD.gn |
index 45bc4fd088e1c2b2bd3621e7730f1c17bf6decee..08cda0b1dc9dc96d6d39c1f67e0a5782ba410eb3 100644 |
--- a/BUILD.gn |
+++ b/BUILD.gn |
@@ -257,6 +257,40 @@ action("js2c") { |
} |
} |
+action("js2c_code_stubs") { |
+ visibility = [ ":*" ] # Only targets in this file can depend on this. |
+ |
+ script = "tools/js2c.py" |
+ |
+ # The script depends on this other script, this rule causes a rebuild if it |
+ # changes. |
+ inputs = [ "tools/jsmin.py" ] |
+ |
+ sources = [ |
+ "src/macros.py", |
+ "src/messages.h", |
+ "src/code-stubs.js" |
+ ] |
+ |
+ outputs = [ |
+ "$target_gen_dir/code-stub-libraries.cc", |
+ ] |
+ |
+ args = [ |
+ rebase_path("$target_gen_dir/code-stub-libraries.cc", |
+ root_build_dir), |
+ "CODE_STUB", |
+ ] + rebase_path(sources, root_build_dir) |
+ |
+ if (v8_use_external_startup_data) { |
+ outputs += [ "$target_gen_dir/libraries_code_stub.bin" ] |
+ args += [ |
+ "--startup_blob", |
+ rebase_path("$target_gen_dir/libraries_code_stub.bin", root_build_dir), |
+ ] |
+ } |
+} |
+ |
action("js2c_experimental") { |
visibility = [ ":*" ] # Only targets in this file can depend on this. |
@@ -354,12 +388,14 @@ if (v8_use_external_startup_data) { |
deps = [ |
":js2c", |
+ ":js2c_code_stubs", |
":js2c_experimental", |
":js2c_extras", |
] |
sources = [ |
"$target_gen_dir/libraries.bin", |
+ "$target_gen_dir/libraries_code_stub.bin", |
"$target_gen_dir/libraries_experimental.bin", |
"$target_gen_dir/libraries_extras.bin", |
] |
@@ -445,6 +481,7 @@ source_set("v8_nosnapshot") { |
deps = [ |
":js2c", |
+ ":js2c_code_stubs", |
":js2c_experimental", |
":js2c_extras", |
":v8_base", |
@@ -452,6 +489,7 @@ source_set("v8_nosnapshot") { |
sources = [ |
"$target_gen_dir/libraries.cc", |
+ "$target_gen_dir/code-stub-libraries.cc", |
"$target_gen_dir/experimental-libraries.cc", |
"$target_gen_dir/extras-libraries.cc", |
"src/snapshot/snapshot-empty.cc", |
@@ -476,6 +514,7 @@ source_set("v8_snapshot") { |
deps = [ |
":js2c", |
+ ":js2c_code_stubs", |
":js2c_experimental", |
":js2c_extras", |
":v8_base", |
@@ -488,6 +527,7 @@ source_set("v8_snapshot") { |
sources = [ |
"$target_gen_dir/libraries.cc", |
+ "$target_gen_dir/code-stub-libraries.cc", |
"$target_gen_dir/experimental-libraries.cc", |
"$target_gen_dir/extras-libraries.cc", |
"$target_gen_dir/snapshot.cc", |
@@ -508,6 +548,7 @@ if (v8_use_external_startup_data) { |
deps = [ |
":js2c", |
+ ":js2c_code_stubs", |
":js2c_experimental", |
":js2c_extras", |
":v8_base", |