From 053630dc092ff21fbab53dbc474a832e7484eb67 Mon Sep 17 00:00:00 2001 From: Chinmay Garde Date: Fri, 13 May 2016 14:26:56 -0700 Subject: [PATCH] Use the i386 toolchain on the Mac host when targetting Android AOTC. (#2685) --- sky/engine/bindings/bindings.gni | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/sky/engine/bindings/bindings.gni b/sky/engine/bindings/bindings.gni index 4dd6ab0e042..0b525edd97a 100644 --- a/sky/engine/bindings/bindings.gni +++ b/sky/engine/bindings/bindings.gni @@ -8,10 +8,11 @@ import("//sky/engine/config.gni") bindings_output_dir = "$root_gen_dir/sky/bindings" dart_host_toolchain = host_toolchain + +# During precompilation, a 64 bit Dart VM cannot generate code for a 32 bit +# architecture (and vice-versa). The snapshotter that is running on the host +# needs to know about the target architecture and built accordingly. if (target_os == "ios" && !use_ios_simulator) { - # During precompilation, a 64 bit Dart VM cannot generate code for a 32 bit - # architecture (and vice-versa). The snapshotter that is running on the host - # needs to know about the target architecture and built accordingly. if (target_cpu == "arm") { dart_host_toolchain = "//build/toolchain/mac:clang_i386" } else if (target_cpu == "arm64") { @@ -20,9 +21,15 @@ if (target_os == "ios" && !use_ios_simulator) { assert(false, "Unknown active architecture on iOS") } } + if (target_os == "android" && flutter_aot) { - if (host_os == "linux" && target_cpu == "arm") { - dart_host_toolchain = "//build/toolchain/linux:clang_x86" + if (target_cpu == "arm") { + if (host_os == "linux") { + dart_host_toolchain = "//build/toolchain/linux:clang_x86" + } + if (host_os == "mac") { + dart_host_toolchain = "//build/toolchain/mac:clang_i386" + } } }