mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
62 lines
1.6 KiB
Plaintext
62 lines
1.6 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")
|
|
}
|
|
|
|
if (target_cpu == "arm" || target_cpu == "arm64") {
|
|
import("//build/config/arm.gni")
|
|
}
|
|
|
|
declare_args() {
|
|
# The runtime mode ("debug", "profile", "release", or "jit_release")
|
|
flutter_runtime_mode = "debug"
|
|
|
|
# Whether to use the Skia text shaper module
|
|
flutter_enable_skshaper = false
|
|
|
|
# Whether to use the legacy embedder when building for Fuchsia.
|
|
flutter_enable_legacy_fuchsia_embedder = true
|
|
}
|
|
|
|
# feature_defines_list ---------------------------------------------------------
|
|
|
|
feature_defines_list = [
|
|
"FLUTTER_RUNTIME_MODE_DEBUG=1",
|
|
"FLUTTER_RUNTIME_MODE_PROFILE=2",
|
|
"FLUTTER_RUNTIME_MODE_RELEASE=3",
|
|
"FLUTTER_RUNTIME_MODE_JIT_RELEASE=4",
|
|
]
|
|
|
|
if (flutter_runtime_mode == "debug") {
|
|
feature_defines_list += [
|
|
"FLUTTER_RUNTIME_MODE=1",
|
|
"FLUTTER_JIT_RUNTIME=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",
|
|
"FLUTTER_RELEASE=1",
|
|
]
|
|
} else if (flutter_runtime_mode == "jit_release") {
|
|
feature_defines_list += [
|
|
"FLUTTER_RUNTIME_MODE=4",
|
|
"FLUTTER_RELEASE=1",
|
|
"FLUTTER_JIT_RUNTIME=1",
|
|
]
|
|
} else {
|
|
feature_defines_list += [ "FLUTTER_RUNTIME_MODE=0" ]
|
|
}
|
|
|
|
if (is_ios || is_mac) {
|
|
flutter_cflags_objc = [
|
|
"-Werror=overriding-method-mismatch",
|
|
"-Werror=undeclared-selector",
|
|
]
|
|
flutter_cflags_objcc = flutter_cflags_objc
|
|
}
|