Index: BUILD.gn |
diff --git a/BUILD.gn b/BUILD.gn |
index a11b1467e286fdc799183bca0d3c358bc29fcb31..260c6a37220365330cc5063d89ad5519e096c87b 100644 |
--- a/BUILD.gn |
+++ b/BUILD.gn |
@@ -632,6 +632,29 @@ action("run_mksnapshot") { |
} |
} |
+action("run_mkpeephole") { |
+ visibility = [ ":*" ] # Only targets in this file can depend on this. |
+ |
+ deps = [ |
+ ":mkpeephole($v8_snapshot_toolchain)", |
+ ] |
+ |
+ outputs = [ |
+ "$target_gen_dir/bytecode-peephole-table.h" |
+ ] |
+ |
+ sources = [] |
+ |
+ script = "tools/run.py" |
+ |
+ args = [ |
+ "./" + rebase_path(get_label_info(":mkpeephole($v8_snapshot_toolchain)", |
+ "root_out_dir") + "/mkpeephole", |
+ root_build_dir), |
+ rebase_path("$target_gen_dir/bytecode-peephole-table.h", root_build_dir), |
+ ] |
+} |
+ |
action("v8_dump_build_config") { |
script = "tools/testrunner/utils/dump_build_config.py" |
outputs = [ |
@@ -1286,6 +1309,7 @@ v8_source_set("v8_base") { |
"src/interpreter/bytecode-label.h", |
"src/interpreter/bytecode-peephole-optimizer.cc", |
"src/interpreter/bytecode-peephole-optimizer.h", |
+ "$target_gen_dir/bytecode-peephole-table.h", |
rmcilroy
2016/07/08 13:18:25
I think this should be a separate target which nee
oth
2016/07/08 15:12:33
I'm not a GN expert, but it definitely detects if
|
"src/interpreter/bytecode-pipeline.cc", |
"src/interpreter/bytecode-pipeline.h", |
"src/interpreter/bytecode-register-allocator.cc", |
@@ -1871,6 +1895,7 @@ v8_source_set("v8_base") { |
deps = [ |
":v8_libbase", |
":v8_libsampler", |
+ "//:run_mkpeephole" |
] |
if (is_win) { |
@@ -2094,6 +2119,24 @@ if (current_toolchain == v8_snapshot_toolchain) { |
"//build/win:default_exe_manifest", |
] |
} |
+ |
+ v8_executable("mkpeephole") { |
+ # mkpeephole needs to be built for the build host so the peephole lookup |
+ # table can built during build. The table depends on the properties of |
+ # bytecodes that are described in bytecodes.{cc,h}. |
+ visibility = [ ":*" ] # Only targets in this file can depend on this. |
+ |
+ sources = [ |
+ "src/interpreter/bytecode-peephole-optimizer.h", |
+ "src/interpreter/bytecodes.cc", |
+ "src/interpreter/bytecodes.h", |
+ "src/interpreter/mkpeephole.cc" |
+ ] |
+ |
+ configs = [ ":internal_config" ] |
+ |
+ deps = [ ":v8_libbase" ] |
+ } |
} |
############################################################################### |