Chromium Code Reviews| Index: BUILD.gn |
| diff --git a/BUILD.gn b/BUILD.gn |
| index a11b1467e286fdc799183bca0d3c358bc29fcb31..0998d62e25a2bfaef9e8e42c20e12e934f24d86f 100644 |
| --- a/BUILD.gn |
| +++ b/BUILD.gn |
| @@ -71,6 +71,7 @@ declare_args() { |
| v8_random_seed = "314159265" |
| v8_toolset_for_shell = "host" |
| +generated_peephole_source = "$target_gen_dir/bytecode-peephole-table.cc" |
| ############################################################################### |
| # Configurations |
| @@ -632,6 +633,29 @@ action("run_mksnapshot") { |
| } |
| } |
| +action("run_mkpeephole") { |
| + visibility = [ ":*" ] # Only targets in this file can depend on this. |
| + |
| + deps = [ |
| + ":mkpeephole($v8_snapshot_toolchain)", |
| + ] |
| + |
| + outputs = [ |
| + generated_peephole_source |
| + ] |
| + |
| + sources = [] |
| + |
| + script = "tools/run.py" |
| + |
| + args = [ |
| + "./" + rebase_path(get_label_info(":mkpeephole($v8_snapshot_toolchain)", |
| + "root_out_dir") + "/mkpeephole", |
| + root_build_dir), |
| + rebase_path(generated_peephole_source, root_build_dir), |
| + ] |
| +} |
| + |
| action("v8_dump_build_config") { |
| script = "tools/testrunner/utils/dump_build_config.py" |
| outputs = [ |
| @@ -1286,6 +1310,7 @@ v8_source_set("v8_base") { |
| "src/interpreter/bytecode-label.h", |
| "src/interpreter/bytecode-peephole-optimizer.cc", |
| "src/interpreter/bytecode-peephole-optimizer.h", |
| + "src/interpreter/bytecode-peephole-table.h", |
| "src/interpreter/bytecode-pipeline.cc", |
| "src/interpreter/bytecode-pipeline.h", |
| "src/interpreter/bytecode-register-allocator.cc", |
| @@ -1871,8 +1896,11 @@ v8_source_set("v8_base") { |
| deps = [ |
| ":v8_libbase", |
| ":v8_libsampler", |
| + "//:run_mkpeephole", |
|
Michael Achenbach
2016/07/11 09:11:42
The // resolve to the project root. That means tha
oth
2016/07/12 10:08:53
Ack, yes, done.
|
| ] |
| + sources += [ generated_peephole_source ] |
| + |
| if (is_win) { |
| # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. |
| cflags = [ "/wd4267" ] |
| @@ -2096,6 +2124,26 @@ if (current_toolchain == v8_snapshot_toolchain) { |
| } |
| } |
| +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", |
| + ] |
| +} |
| + |
| ############################################################################### |
| # Public targets |
| # |