From ecb98b8d7fc65eea12593618c721074271613e52 Mon Sep 17 00:00:00 2001 From: Ivica Bogosavljevic Date: Wed, 15 Nov 2017 16:33:48 +0100 Subject: [PATCH] MIPS[64]: Generate snapshots on MIPS big-endian targets It is not possible to simulate big-endian systems on X64/X86, so snapshots must be generated natively or using an emulator such as qemu. Bug: Change-Id: Ib7ea6fe27ea5da19f270251f18fbc5f1c43413ce Reviewed-on: https://chromium-review.googlesource.com/771673 Commit-Queue: Ivica Bogosavljevic Reviewed-by: Michael Achenbach Reviewed-by: Ivica Bogosavljevic Cr-Commit-Position: refs/heads/master@{#49621} --- snapshot_toolchain.gni | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/snapshot_toolchain.gni b/snapshot_toolchain.gni index 80cd1bd390..756413e5ce 100644 --- a/snapshot_toolchain.gni +++ b/snapshot_toolchain.gni @@ -63,6 +63,12 @@ if (v8_snapshot_toolchain == "") { } else if (current_os == "win" && host_os == "mac" && is_clang) { # This is a mac -> win cross-compile, which is only supported w/ clang. v8_snapshot_toolchain = "//build/toolchain/mac:clang_${v8_current_cpu}" + } else if (host_cpu == "x64" && + (v8_current_cpu == "mips" || v8_current_cpu == "mips64")) { + # We don't support snapshot generation for big-endian targets, + # therefore snapshots will need to be built using native mksnapshot + # in combination with qemu + v8_snapshot_toolchain = current_toolchain } else if (host_cpu == "x64") { # This is a cross-compile from an x64 host to either a non-Intel target # cpu or a different target OS. Clang will always be used by default on the @@ -76,11 +82,9 @@ if (v8_snapshot_toolchain == "") { if (v8_current_cpu == "x64" || v8_current_cpu == "x86") { _cpus = v8_current_cpu - } else if (v8_current_cpu == "arm64" || v8_current_cpu == "mips64el" || - v8_current_cpu == "mips64") { + } else if (v8_current_cpu == "arm64" || v8_current_cpu == "mips64el") { _cpus = "x64_v8_${v8_current_cpu}" - } else if (v8_current_cpu == "arm" || v8_current_cpu == "mipsel" || - v8_current_cpu == "mips") { + } else if (v8_current_cpu == "arm" || v8_current_cpu == "mipsel") { _cpus = "x86_v8_${v8_current_cpu}" } else { # This branch should not be reached; leave _cpus blank so the assert