fix: build torque with x64 toolchain

Co-Authored-By: Alexey Kuzmin <github@alexeykuzmin.com>
This commit is contained in:
John Kleinschmidt 2018-10-03 16:34:44 -04:00 committed by Aleksei Kuzmin
parent f7f93d2071
commit df32326ce5
2 changed files with 28 additions and 0 deletions

View file

@ -65,3 +65,8 @@ patches:
author: Shelley Vohr <shelley.vohr@gmail.com>
file: expose_mksnapshot.patch
description: Needed in order to build mksnapshot on arm.
-
author: Aleksei Kuzmin <alkuzmin@microsoft.com>
file: build-torque-with-x64-toolchain-on-arm.patch
description: |
torque binary has to be run during the build.

View file

@ -0,0 +1,23 @@
diff --git a/BUILD.gn b/BUILD.gn
index 456a318..af803ff 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -870,7 +870,8 @@ action("run_torque") {
# 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_current_cpu == "mips" || v8_current_cpu == "mips64" ||
+ v8_current_cpu == "arm" || v8_current_cpu == "arm64")) {
v8_torque_toolchain = "//build/toolchain/linux:clang_x64"
}
@@ -3079,7 +3080,7 @@ if (v8_use_snapshot && current_toolchain == v8_snapshot_toolchain) {
}
}
-if (current_toolchain == v8_snapshot_toolchain) {
+if (current_toolchain == current_toolchain) {
v8_executable("torque") {
visibility = [ ":*" ] # Only targets in this file can depend on this.