mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
60 lines
1.7 KiB
Plaintext
60 lines
1.7 KiB
Plaintext
# Copyright 2014 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.
|
|
|
|
if (is_android) {
|
|
import("//build/config/android/config.gni")
|
|
}
|
|
|
|
if (target_cpu == "arm" || target_cpu == "arm64") {
|
|
import("//build/config/arm.gni")
|
|
}
|
|
|
|
declare_args() {
|
|
# Enable asserts, even in release builds.
|
|
flutter_asserts_always_on = false
|
|
|
|
# Enable ahead-of-time compilation on platforms where AOT is optional.
|
|
flutter_aot = false
|
|
|
|
# The runtime mode ("debug", "profile", or "release")
|
|
flutter_runtime_mode = "debug"
|
|
}
|
|
|
|
# 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_debug) {
|
|
# TODO(GYP) this should also be set when release_valgrind_build is set,
|
|
# but we don't have that flag in the GN build yet.
|
|
feature_defines_list += [ "WTF_USE_DYNAMIC_ANNOTATIONS=1" ]
|
|
}
|
|
|
|
if (!is_mac) {
|
|
# Mac OS X has not implemented support for ENABLE(OPENTYPE_VERTICAL) yet.
|
|
feature_defines_list += [ "ENABLE_OPENTYPE_VERTICAL=1" ]
|
|
}
|
|
|
|
if (flutter_asserts_always_on) {
|
|
feature_defines_list += [ "ENABLE_ASSERT=1" ]
|
|
}
|
|
|
|
if (flutter_aot) {
|
|
feature_defines_list += [ "FLUTTER_AOT=1" ]
|
|
}
|