From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aleksei Kuzmin <alkuzmin@microsoft.com>
Date: Mon, 22 Oct 2018 10:47:13 -0700
Subject: build-torque-with-x64-toolchain-on-arm.patch

torque binary has to be run during the build.

diff --git a/BUILD.gn b/BUILD.gn
index b5eb09cfcb8add19f4de985cbe7b9777c51c4bd3..dbe4338c3a733cb806e420a9bb0b4bcc65cf333b 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -899,7 +899,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"
   }
 
@@ -3149,7 +3150,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.
 
