config.gni 1.5 KB
Newer Older
A
Adam Barth 已提交
1 2 3 4 5 6 7
# 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")
}
8

9
if (target_cpu == "arm" || target_cpu == "arm64") {
A
Adam Barth 已提交
10 11 12 13
  import("//build/config/arm.gni")
}

declare_args() {
14 15 16
  # Enable ahead-of-time compilation on platforms where AOT is optional.
  flutter_aot = false

17
  # The runtime mode ("debug", "profile", "release", "dynamic_profile", or "dynamic_release")
18
  flutter_runtime_mode = "debug"
A
Adam Barth 已提交
19 20 21 22
}

# feature_defines_list ---------------------------------------------------------

23 24 25 26
feature_defines_list = [
  "FLUTTER_RUNTIME_MODE_DEBUG=1",
  "FLUTTER_RUNTIME_MODE_PROFILE=2",
  "FLUTTER_RUNTIME_MODE_RELEASE=3",
27 28
  "FLUTTER_RUNTIME_MODE_DYNAMIC_PROFILE=4",
  "FLUTTER_RUNTIME_MODE_DYNAMIC_RELEASE=5",
29 30 31 32 33 34 35 36
]

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" ]
37 38 39 40
} else if (flutter_runtime_mode == "dynamic_profile") {
  feature_defines_list += [ "FLUTTER_RUNTIME_MODE=4" ]
} else if (flutter_runtime_mode == "dynamic_release") {
  feature_defines_list += [ "FLUTTER_RUNTIME_MODE=5" ]
41 42 43
} else {
  feature_defines_list += [ "FLUTTER_RUNTIME_MODE=0" ]
}
A
Adam Barth 已提交
44

45 46 47
if (flutter_aot) {
  feature_defines_list += [ "FLUTTER_AOT=1" ]
}