From 7b02398ee0cd84ad5374c458601d98dd81b0562d Mon Sep 17 00:00:00 2001 From: Chris Bracken Date: Wed, 14 Aug 2019 18:21:40 -0700 Subject: [PATCH] Fix gn breakage on Fuchsia macOS host builds (flutter/engine#11016) When building Fuchsia on macOS hosts, ensure that we reference the correct clang toolchain path. This patch also prevents bitcode compilation on Fuchsia tree builds on macOS. --- engine/src/flutter/common/config.gni | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/engine/src/flutter/common/config.gni b/engine/src/flutter/common/config.gni index 2f5750a31f..5cda3a88b1 100644 --- a/engine/src/flutter/common/config.gni +++ b/engine/src/flutter/common/config.gni @@ -6,7 +6,7 @@ if (is_android) { import("//build/config/android/config.gni") } -if (is_fuchsia) { +if (is_fuchsia || is_fuchsia_host) { import("//build/fuchsia/sdk.gni") } @@ -15,7 +15,11 @@ if (target_cpu == "arm" || target_cpu == "arm64") { } if (is_ios || is_mac) { - import("//build/toolchain/clang.gni") + if (using_fuchsia_sdk) { + import("//build/toolchain/clang.gni") + } else { + import("//build/toolchain/clang_toolchain.gni") + } } declare_args() { @@ -53,6 +57,6 @@ if (is_fuchsia && using_fuchsia_sdk) { feature_defines_list += [ "FUCHSIA_SDK=1" ] } -if (is_ios || is_mac) { +if ((is_ios || is_mac) && defined(enable_bitcode)) { flutter_enable_bitcode = enable_bitcode }