blob: 63fef30acaab478154989ec4c2bea8cddbfdd7d1 [file] [log] [blame]
# Copyright 2018 The Fuchsia 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_debug) {
default_optimize = "debug"
} else {
# TODO(phosek): consider using "size" in release mode to reduce size.
default_optimize = "speed"
}
declare_args() {
# How many symbols to include in the build. This affects the performance of
# the build since the symbols are large and dealing with them is slow.
# 2 means regular build with symbols.
# 1 means minimal symbols, usually enough for backtraces only. Symbols with
# internal linkage (static functions or those in anonymous namespaces) may not
# appear when using this level.
# 0 means no symbols.
symbol_level = 2
}
# NOTE: Keep in sync with //zircon/public/gn/config/levels.gni
# TODO: Unify the default value between the two builds.
declare_args() {
# * `none`: really unoptimized, usually only build-tested and not run
# * `debug`: "optimized for debugging", light enough to avoid confusion
# * `default`: default optimization level
# * `size`: optimized for space rather than purely for speed
# * `speed`: optimized purely for speed
# * `sanitizer`: optimized for sanitizers (ASan, etc.)
# * `profile`: optimized for coverage/profile data collection
optimize = default_optimize
}
_optimize_valid = [
"none",
"debug",
"default",
"size",
"speed",
"sanitizer",
"profile",
]
assert(_optimize_valid + [ optimize ] - [ optimize ] != _optimize_valid,
"`optimize=\"...\"` must be one of $_optimize_valid")