Commit 011401c1 authored by Dan Elphick's avatar Dan Elphick Committed by Commit Bot

Build bytecode_builtins_list_generator with same toolchain as torque

Fix build issues on mips by using the same v8_torque_toolchain (renamed
to v8_generator_toolchain), which is the same as the host tool chain
when targeting MIPS.

Bug: v8:8162
Change-Id: I5d213398cba4c5e108b203e6aa6ba5a2b0e8f781
Reviewed-on: https://chromium-review.googlesource.com/1221289
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55844}
parent 07412dc6
...@@ -161,6 +161,17 @@ declare_args() { ...@@ -161,6 +161,17 @@ declare_args() {
# setting the "check_v8_header_includes" gclient variable to run a # setting the "check_v8_header_includes" gclient variable to run a
# specific hook). # specific hook).
v8_check_header_includes = false v8_check_header_includes = false
# We reuse the snapshot toolchain for building torque and other generators to
# avoid building v8_libbase on the host more than once. On mips with big
# endian, the snapshot toolchain is the target toolchain and, hence, can't be
# used.
}
v8_generator_toolchain = v8_snapshot_toolchain
if (host_cpu == "x64" &&
(v8_current_cpu == "mips" || v8_current_cpu == "mips64")) {
v8_generator_toolchain = "//build/toolchain/linux:clang_x64"
} }
# Derived defaults. # Derived defaults.
...@@ -910,17 +921,8 @@ action("run_torque") { ...@@ -910,17 +921,8 @@ action("run_torque") {
"test/cctest/:*", "test/cctest/:*",
] ]
# We reuse the snapshot toolchain for building torque to not build v8_libbase
# on the host more than once. On mips with big endian, the snapshot toolchain
# is the target toolchain and, hence, can't be used.
v8_torque_toolchain = v8_snapshot_toolchain
if (host_cpu == "x64" &&
(v8_current_cpu == "mips" || v8_current_cpu == "mips64")) {
v8_torque_toolchain = "//build/toolchain/linux:clang_x64"
}
deps = [ deps = [
":torque($v8_torque_toolchain)", ":torque($v8_generator_toolchain)",
] ]
script = "tools/run.py" script = "tools/run.py"
...@@ -938,7 +940,7 @@ action("run_torque") { ...@@ -938,7 +940,7 @@ action("run_torque") {
} }
args = [ args = [
"./" + rebase_path(get_label_info(":torque($v8_torque_toolchain)", "./" + rebase_path(get_label_info(":torque($v8_generator_toolchain)",
"root_out_dir") + "/torque", "root_out_dir") + "/torque",
root_build_dir), root_build_dir),
"-o", "-o",
...@@ -995,12 +997,12 @@ action("generate_bytecode_builtins_list") { ...@@ -995,12 +997,12 @@ action("generate_bytecode_builtins_list") {
"$target_gen_dir/builtins-generated/bytecodes-builtins-list.h", "$target_gen_dir/builtins-generated/bytecodes-builtins-list.h",
] ]
deps = [ deps = [
":bytecode_builtins_list_generator($v8_snapshot_toolchain)", ":bytecode_builtins_list_generator($v8_generator_toolchain)",
] ]
args = [ args = [
"./" + rebase_path( "./" + rebase_path(
get_label_info( get_label_info(
":bytecode_builtins_list_generator($v8_snapshot_toolchain)", ":bytecode_builtins_list_generator($v8_generator_toolchain)",
"root_out_dir") + "/bytecode_builtins_list_generator", "root_out_dir") + "/bytecode_builtins_list_generator",
root_build_dir), root_build_dir),
rebase_path("$target_gen_dir/builtins-generated/bytecodes-builtins-list.h"), rebase_path("$target_gen_dir/builtins-generated/bytecodes-builtins-list.h"),
...@@ -3284,7 +3286,7 @@ if (v8_monolithic) { ...@@ -3284,7 +3286,7 @@ if (v8_monolithic) {
# Executables # Executables
# #
if (current_toolchain == v8_snapshot_toolchain) { if (current_toolchain == v8_generator_toolchain) {
v8_executable("bytecode_builtins_list_generator") { v8_executable("bytecode_builtins_list_generator") {
visibility = [ ":*" ] # Only targets in this file can depend on this. visibility = [ ":*" ] # Only targets in this file can depend on this.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment