electron/patches/common/v8/build-torque-with-x64-toolchain-on-arm.patch
2019-03-08 15:13:12 -08:00

31 lines
1.2 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: deepak1556 <hop2deep@gmail.com>
Date: Thu, 21 Feb 2019 00:06:32 +0530
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 5b3e0831c2657f4fa07adaa1de5fda6d2360c2ec..344a7fb5c5e54295fc7fd4f61780bdcf40bd6bd4 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -178,7 +178,9 @@ declare_args() {
# 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_current_cpu == "mips" || v8_current_cpu == "mips64" ||
+ v8_snapshot_toolchain == "//build/toolchain/linux:clang_arm" ||
+ v8_snapshot_toolchain == "//build/toolchain/linux:clang_arm64")) {
v8_generator_toolchain = "//build/toolchain/linux:clang_x64"
}
@@ -3539,7 +3541,7 @@ if (v8_use_snapshot && current_toolchain == v8_snapshot_toolchain) {
}
}
-if (current_toolchain == v8_snapshot_toolchain) {
+if (current_toolchain == v8_generator_toolchain) {
v8_executable("torque") {
visibility = [ ":*" ] # Only targets in this file can depend on this.