forked from flutter/engine
-
Notifications
You must be signed in to change notification settings - Fork 2
/
config.gni
70 lines (58 loc) · 1.89 KB
/
config.gni
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# 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_fuchsia) {
import("//build/toolchain/clang.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
# 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",
"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_fuchsia) {
# TODO(chinmaygarde): This is always set. The macro may now be removed.
feature_defines_list += [ "FUCHSIA_SDK=1" ]
}
if ((is_ios || is_mac) && defined(enable_bitcode)) {
flutter_enable_bitcode = enable_bitcode
}