Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(106)

Unified Diff: build/config/BUILDCONFIG.gn

Issue 1324623005: Move sanitizer and symbol flags out of BUILDCONFIG (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/BUILD.gn ('k') | build/config/compiler/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/BUILDCONFIG.gn
diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn
index 6bc28eccf710cf6e6b2f40609d1a79b7ef67837b..65798d8e89551f21682fbd568fe6d8f6e2578f58 100644
--- a/build/config/BUILDCONFIG.gn
+++ b/build/config/BUILDCONFIG.gn
@@ -111,14 +111,6 @@ if (current_os == "") {
# even if the value is overridden, which is wasteful. See first bullet.
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.
- # 0 means no symbols.
- # -1 means auto-set (off in release, regular in debug).
- symbol_level = -1
-
# Component build.
is_component_build = false
@@ -133,18 +125,6 @@ declare_args() {
is_clang = current_os == "mac" || current_os == "ios" ||
current_os == "linux" || current_os == "chromeos"
- # Compile for Address Sanitizer to find memory bugs.
- is_asan = false
-
- # Compile for Leak Sanitizer to find leaks.
- is_lsan = false
-
- # Compile for Memory Sanitizer to find uninitialized reads.
- is_msan = false
-
- # Compile for Thread Sanitizer to find threading bugs.
- is_tsan = false
-
if (current_os == "chromeos") {
# Allows the target toolchain to be injected as arguments. This is needed
# to support the CrOS build system which supports per-build-configuration
@@ -356,16 +336,6 @@ if (!is_chromeos) {
set_sources_assignment_filter(sources_assignment_filter)
# =============================================================================
-# BUILD OPTIONS
-# =============================================================================
-
-# These Sanitizers all imply using the Clang compiler. On Windows they either
-# don't work or work differently.
-if (!is_clang && (is_asan || is_lsan || is_tsan || is_msan)) {
- is_clang = true
-}
-
-# =============================================================================
# TARGET DEFAULTS
# =============================================================================
#
@@ -382,6 +352,8 @@ _native_compiler_configs = [
"//build/config/compiler:compiler_arm_fpu",
"//build/config/compiler:chromium_code",
"//build/config/compiler:default_include_dirs",
+ "//build/config/compiler:default_optimization",
+ "//build/config/compiler:default_symbols",
"//build/config/compiler:no_rtti",
"//build/config/compiler:runtime_library",
]
@@ -425,38 +397,9 @@ if (is_clang && !is_nacl) {
# Optimizations and debug checking.
Dirk Pranke 2015/09/04 22:32:26 it seems like this comment might be a bit confusin
brettw 2015/09/04 23:36:24 Done.
if (is_debug) {
_native_compiler_configs += [ "//build/config:debug" ]
- _default_optimization_config = "//build/config/compiler:no_optimize"
} else {
_native_compiler_configs += [ "//build/config:release" ]
- _default_optimization_config = "//build/config/compiler:optimize"
-}
-_native_compiler_configs += [ _default_optimization_config ]
-
-# If it wasn't manually set, set to an appropriate default.
-if (symbol_level == -1) {
- # Linux is slowed by having symbols as part of the target binary, whereas
- # Mac and Windows have them separate, so in Release Linux, default them off.
- if (is_debug || !is_linux) {
- symbol_level = 2
- } else if (is_asan || is_lsan || is_tsan || is_msan) {
- # Sanitizers require symbols for filename suppressions to work.
- symbol_level = 1
- } else {
- symbol_level = 0
- }
-}
-
-# Symbol setup.
-if (symbol_level == 2) {
- _default_symbols_config = "//build/config/compiler:symbols"
-} else if (symbol_level == 1) {
- _default_symbols_config = "//build/config/compiler:minimal_symbols"
-} else if (symbol_level == 0) {
- _default_symbols_config = "//build/config/compiler:no_symbols"
-} else {
- assert(false, "Bad value for symbol_level.")
}
-_native_compiler_configs += [ _default_symbols_config ]
# Windows linker setup for EXEs and DLLs.
if (is_win) {
« no previous file with comments | « base/BUILD.gn ('k') | build/config/compiler/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698