| # Copyright 2015 The Chromium Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import("//flutter/common/config.gni") # for flutter_aot |
| |
| if (target_os == "ios") { |
| import("//build/config/ios/ios_sdk.gni") # For use_ios_simulator |
| } |
| |
| 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) { |
| if (target_cpu == "arm") { |
| dart_host_toolchain = "//build/toolchain/mac:clang_i386" |
| } else if (target_cpu == "arm64") { |
| dart_host_toolchain = "//build/toolchain/mac:clang_x64" |
| } else { |
| assert(false, "Unknown active architecture on iOS") |
| } |
| } |
| |
| if (target_os == "android" && flutter_aot) { |
| 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" |
| } |
| } |
| } |