mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Ensure that we always pull in the ensure_fuchsia_sdk gn variable. Fixes breakage introduced in flutter/engine#11016 when building outside of a Fuchsia tree (e.g. in a stock Flutter engine tree0 on macOS hosts.
61 lines
1.7 KiB
Plaintext
61 lines
1.7 KiB
Plaintext
# Copyright 2013 The Flutter Authors. All rights reserved.
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
|
|
if (is_android) {
|
|
import("//build/config/android/config.gni")
|
|
}
|
|
|
|
import("//build/fuchsia/sdk.gni")
|
|
|
|
if (target_cpu == "arm" || target_cpu == "arm64") {
|
|
import("//build/config/arm.gni")
|
|
}
|
|
|
|
if (is_ios || is_mac) {
|
|
if (using_fuchsia_sdk) {
|
|
import("//build/toolchain/clang.gni")
|
|
} else {
|
|
import("//build/toolchain/clang_toolchain.gni")
|
|
}
|
|
}
|
|
|
|
declare_args() {
|
|
# The runtime mode ("debug", "profile", or "release")
|
|
flutter_runtime_mode = "debug"
|
|
|
|
# Whether to use the Skia text shaper module
|
|
flutter_enable_skshaper = false
|
|
|
|
# A copy of the enable_bitcode flag from build/toolchain/clang.gni.
|
|
# This needs to be mirrored here because build/toolchain/clang.gni does
|
|
# not exist in the Fuchsia source tree.
|
|
flutter_enable_bitcode = false
|
|
}
|
|
|
|
# feature_defines_list ---------------------------------------------------------
|
|
|
|
feature_defines_list = [
|
|
"FLUTTER_RUNTIME_MODE_DEBUG=1",
|
|
"FLUTTER_RUNTIME_MODE_PROFILE=2",
|
|
"FLUTTER_RUNTIME_MODE_RELEASE=3",
|
|
]
|
|
|
|
if (flutter_runtime_mode == "debug") {
|
|
feature_defines_list += [ "FLUTTER_RUNTIME_MODE=1" ]
|
|
} else if (flutter_runtime_mode == "profile") {
|
|
feature_defines_list += [ "FLUTTER_RUNTIME_MODE=2" ]
|
|
} else if (flutter_runtime_mode == "release") {
|
|
feature_defines_list += [ "FLUTTER_RUNTIME_MODE=3" ]
|
|
} else {
|
|
feature_defines_list += [ "FLUTTER_RUNTIME_MODE=0" ]
|
|
}
|
|
|
|
if (is_fuchsia && using_fuchsia_sdk) {
|
|
feature_defines_list += [ "FUCHSIA_SDK=1" ]
|
|
}
|
|
|
|
if ((is_ios || is_mac) && defined(enable_bitcode)) {
|
|
flutter_enable_bitcode = enable_bitcode
|
|
}
|