Index: build/config/compiler/BUILD.gn |
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn |
index 74dec11c3b8b645c5030e3925a0ce950d7167e6e..53ca6cb6e8ce3eae33d4c9497d0257a1c49c51b1 100644 |
--- a/build/config/compiler/BUILD.gn |
+++ b/build/config/compiler/BUILD.gn |
@@ -144,106 +144,6 @@ config("compiler") { |
# TODO(jochen): Enable this on chromeos on arm. http://crbug.com/356580 |
ldflags += [ "-Wl,--fatal-warnings" ] |
} |
- |
- # Common options for AddressSanitizer, LeakSanitizer, ThreadSanitizer, |
- # MemorySanitizer and non-official CFI builds. |
- if (using_sanitizer || (is_cfi && !is_official_build)) { |
- cflags += [ |
- "-fno-omit-frame-pointer", |
- "-gline-tables-only", |
- ] |
- } |
- if (is_asan) { |
- asan_blacklist_path = |
- rebase_path("//tools/memory/asan/blacklist.txt", root_build_dir) |
- cflags += [ |
- "-fsanitize=address", |
- "-fsanitize-blacklist=$asan_blacklist_path", |
- ] |
- if (is_mac) { |
- cflags += [ "-mllvm -asan-globals=0" ] # http://crbug.com/352073 |
- # TODO(GYP): deal with mac_bundles. |
- } |
- } |
- if (is_lsan) { |
- cflags += [ "-fsanitize=leak" ] |
- } |
- if (is_tsan) { |
- tsan_blacklist_path = |
- rebase_path("//tools/memory/tsan_v2/ignores.txt", root_build_dir) |
- cflags += [ |
- "-fsanitize=thread", |
- "-fsanitize-blacklist=$tsan_blacklist_path", |
- ] |
- } |
- if (is_msan) { |
- msan_blacklist_path = |
- rebase_path("//tools/msan/blacklist.txt", root_build_dir) |
- cflags += [ |
- "-fsanitize=memory", |
- "-fsanitize-memory-track-origins=$msan_track_origins", |
- "-fsanitize-blacklist=$msan_blacklist_path", |
- ] |
- } |
- if (is_cfi && !is_nacl) { |
- cfi_blacklist_path = |
- rebase_path("//tools/cfi/blacklist.txt", root_build_dir) |
- cflags += [ |
- "-flto", |
- "-fsanitize=cfi-vcall", |
- "-fsanitize=cfi-derived-cast", |
- "-fsanitize=cfi-unrelated-cast", |
- "-fsanitize-blacklist=$cfi_blacklist_path", |
- ] |
- ldflags += [ |
- "-flto", |
- "-fsanitize=cfi-vcall", |
- "-fsanitize=cfi-derived-cast", |
- "-fsanitize=cfi-unrelated-cast", |
- ] |
- |
- # Apply a lower LTO optimization level in non-official builds. |
- if (!is_official_build) { |
- if (is_linux) { |
- ldflags += [ "-Wl,-plugin-opt,O1" ] |
- } else if (is_mac) { |
- ldflags += [ "-Wl,-mllvm,-O1" ] |
- } |
- } |
- |
- # Work-around for http://openradar.appspot.com/20356002 |
- if (is_mac) { |
- ldflags += [ "-Wl,-all_load" ] |
- } |
- |
- # Without this flag, LTO produces a .text section that is larger |
- # than the maximum call displacement, preventing the linker from |
- # relocating calls (http://llvm.org/PR22999). |
- if (current_cpu == "arm") { |
- ldflags += [ "-Wl,-plugin-opt,-function-sections" ] |
- } |
- |
- if (use_cfi_diag) { |
- cflags += [ |
- "-fno-sanitize-trap=cfi", |
- "-fsanitize-recover=cfi", |
- ] |
- ldflags += [ |
- "-fno-sanitize-trap=cfi", |
- "-fsanitize-recover=cfi", |
- ] |
- } else { |
- defines += [ "CFI_ENFORCEMENT" ] |
- } |
- } |
- |
- if (use_custom_libcxx) { |
- cflags_cc += [ "-nostdinc++" ] |
- include_dirs = [ |
- "//buildtools/third_party/libc++/trunk/include", |
- "//buildtools/third_party/libc++abi/trunk/include", |
- ] |
- } |
} |
if (is_clang && is_debug) { |