From df32326ce57989735709fafd51c16db7ef68c369 Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Wed, 3 Oct 2018 16:34:44 -0400 Subject: [PATCH] fix: build torque with x64 toolchain Co-Authored-By: Alexey Kuzmin --- patches/common/v8/.patches.yaml | 5 ++++ ...ild-torque-with-x64-toolchain-on-arm.patch | 23 +++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 patches/common/v8/build-torque-with-x64-toolchain-on-arm.patch diff --git a/patches/common/v8/.patches.yaml b/patches/common/v8/.patches.yaml index 40ce5d1ec411..e52d9156f4ff 100644 --- a/patches/common/v8/.patches.yaml +++ b/patches/common/v8/.patches.yaml @@ -65,3 +65,8 @@ patches: author: Shelley Vohr file: expose_mksnapshot.patch description: Needed in order to build mksnapshot on arm. +- + author: Aleksei Kuzmin + file: build-torque-with-x64-toolchain-on-arm.patch + description: | + torque binary has to be run during the build. diff --git a/patches/common/v8/build-torque-with-x64-toolchain-on-arm.patch b/patches/common/v8/build-torque-with-x64-toolchain-on-arm.patch new file mode 100644 index 000000000000..df7119dc63a3 --- /dev/null +++ b/patches/common/v8/build-torque-with-x64-toolchain-on-arm.patch @@ -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. +