Skip to content
Permalink
Browse files

build: make torque patch more specific for native arm builds (#16992)

* build: make torque patch more specific

the v8_generator_toolchain should only be overriden if the snapshot toolchain is a native arm or arm64 toolchain

* Only test native mksnapshot on arm64

* Put environment variable in container
  • Loading branch information...
jkleinsc committed Feb 18, 2019
1 parent 596acdc commit 35c3a7e1307a792f4dbee2f21f7e66e9d17a7978
Showing with 9 additions and 14 deletions.
  1. +6 −14 patches/common/v8/build-torque-with-x64-toolchain-on-arm.patch
  2. +1 −0 vsts-arm-test-steps.yml
  3. +2 −0 vsts-arm64v8.yml
@@ -6,34 +6,26 @@ 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 b70c09aa34aa7547e7d26d9e35795904a17c092f..0fa207082101165ec5d888cd21e4ca916ee458a9 100644
index 9251b1cab957249be15e05beeabd9f20c841c348..465247a682cc1012d77c28c731fe1553565f128f 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -184,7 +184,8 @@ declare_args() {
@@ -184,7 +184,9 @@ declare_args() {

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_current_cpu == "arm" || v8_current_cpu == "arm64")) {
+ v8_snapshot_toolchain == "//build/toolchain/linux:clang_arm" ||
+ v8_snapshot_toolchain == "//build/toolchain/linux:clang_arm64")) {
v8_generator_toolchain = "//build/toolchain/linux:clang_x64"
}

@@ -3352,7 +3353,7 @@ if (v8_monolithic) {
# Executables
#

-if (current_toolchain == v8_generator_toolchain) {
+if (current_toolchain == current_toolchain) {
v8_executable("bytecode_builtins_list_generator") {
visibility = [ ":*" ] # Only targets in this file can depend on this.

@@ -3402,7 +3403,7 @@ if (v8_use_snapshot && current_toolchain == v8_snapshot_toolchain) {
@@ -3412,7 +3414,7 @@ if (v8_use_snapshot && current_toolchain == v8_snapshot_toolchain) {
}
}

-if (current_toolchain == v8_snapshot_toolchain) {
+if (current_toolchain == current_toolchain) {
+if (current_toolchain == v8_generator_toolchain) {
v8_executable("torque") {
visibility = [ ":*" ] # Only targets in this file can depend on this.

@@ -88,6 +88,7 @@ steps:
timeoutInMinutes: 5
env:
ELECTRON_DISABLE_SANDBOX: 1
condition: and(succeeded(), eq(variables['RUN_NATIVE_MKSNAPSHOT'], 'true'))

- task: PublishTestResults@2
displayName: 'Publish Test Results'
@@ -2,6 +2,8 @@ resources:
containers:
- container: arm64v8-test-container
image: electronbuilds/arm64v8:0.0.4
env:
RUN_NATIVE_MKSNAPSHOT: true

jobs:
- job: Test_Arm64

0 comments on commit 35c3a7e

Please sign in to comment.
You can’t perform that action at this time.