Add dart_product GN build argument

BUG=
R=iposva@google.com

Review URL: https://codereview.chromium.org/1885593002 .
This commit is contained in:
John McCutchan 2016-04-13 12:55:16 -07:00
parent e67a6babcf
commit 7e498d2ba5

View file

@ -12,6 +12,10 @@ declare_args() {
# while themselves doing a Debug build.
dart_debug = false
# Product mode drops many features (e.g. debugger, profiler, etc) in order to
# shrink download size and decrease memory and cpu usage.
dart_product = false
# Explicitly set the target architecture in case of precompilation. Leaving
# this unspecified results in automatic target architecture detection.
# Available options are: arm, arm64, mips, x64 and ia32
@ -50,6 +54,15 @@ config("dart_config") {
defines += ["NDEBUG"]
}
if (dart_product) {
if (dart_debug) {
print("Debug and product mode are mutually exclusive.")
}
assert(!dart_debug)
defines += ["PRODUCT"]
}
if (is_ios || is_mac) {
defines += ["DART_PRECOMPILER"]
}
@ -113,6 +126,14 @@ config("dart_config_no_precompiler") {
defines += ["NDEBUG"]
}
if (dart_product) {
if (dart_debug) {
print("Debug and product mode are mutually exclusive.")
}
assert(!dart_debug)
defines += ["PRODUCT"]
}
cflags = [
"-Werror",
"-Wall",