OLD | NEW |
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import("//build/config/android/config.gni") | 5 import("//build/config/android/config.gni") |
6 import("//build/config/chrome_build.gni") | 6 import("//build/config/chrome_build.gni") |
7 if (current_cpu == "arm") { | 7 if (current_cpu == "arm") { |
8 import("//build/config/arm.gni") | 8 import("//build/config/arm.gni") |
9 } | 9 } |
10 if (current_cpu == "mipsel" || current_cpu == "mips64el") { | 10 if (current_cpu == "mipsel" || current_cpu == "mips64el") { |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 | 132 |
133 # Common options for AddressSanitizer, LeakSanitizer, ThreadSanitizer and | 133 # Common options for AddressSanitizer, LeakSanitizer, ThreadSanitizer and |
134 # MemorySanitizer | 134 # MemorySanitizer |
135 if (using_sanitizer) { | 135 if (using_sanitizer) { |
136 cflags += [ | 136 cflags += [ |
137 "-fno-omit-frame-pointer", | 137 "-fno-omit-frame-pointer", |
138 "-gline-tables-only", | 138 "-gline-tables-only", |
139 ] | 139 ] |
140 } | 140 } |
141 if (is_asan) { | 141 if (is_asan) { |
142 cflags += [ "-fsanitize=address" ] | 142 asan_blacklist_path = rebase_path(asan_blacklist, root_build_dir) |
| 143 cflags += [ |
| 144 "-fsanitize=address", |
| 145 "-fsanitize-blacklist=$asan_blacklist_path", |
| 146 ] |
143 if (is_mac) { | 147 if (is_mac) { |
144 cflags += [ "-mllvm -asan-globals=0" ] # http://crbug.com/352073 | 148 cflags += [ "-mllvm -asan-globals=0" ] # http://crbug.com/352073 |
145 # TODO(GYP): deal with mac_bundles. | 149 # TODO(GYP): deal with mac_bundles. |
146 } | 150 } |
147 } | 151 } |
| 152 if (is_lsan) { |
| 153 cflags += [ "-fsanitize=leak" ] |
| 154 } |
| 155 if (is_tsan) { |
| 156 tsan_blacklist_path = rebase_path(tsan_blacklist, root_build_dir) |
| 157 cflags += [ |
| 158 "-fsanitize=thread", |
| 159 "-fsanitize-blacklist=$tsan_blacklist_path", |
| 160 ] |
| 161 } |
| 162 if (is_msan) { |
| 163 msan_blacklist_path = rebase_path(msan_blacklist, root_build_dir) |
| 164 cflags += [ |
| 165 "-fsanitize=memory", |
| 166 "-fsanitize-memory-track-origins=$msan_track_origins", |
| 167 "-fsanitize-blacklist=$msan_blacklist_path", |
| 168 ] |
| 169 |
| 170 # TODO(GYP): Support instrumented libraries and custom libc++. |
| 171 } |
148 } | 172 } |
149 | 173 |
150 if (is_clang && is_debug) { | 174 if (is_clang && is_debug) { |
151 # Allow comparing the address of references and 'this' against 0 | 175 # Allow comparing the address of references and 'this' against 0 |
152 # in debug builds. Technically, these can never be null in | 176 # in debug builds. Technically, these can never be null in |
153 # well-defined C/C++ and Clang can optimize such checks away in | 177 # well-defined C/C++ and Clang can optimize such checks away in |
154 # release builds, but they may be used in asserts in debug builds. | 178 # release builds, but they may be used in asserts in debug builds. |
155 cflags_cc += [ | 179 cflags_cc += [ |
156 "-Wno-undefined-bool-conversion", | 180 "-Wno-undefined-bool-conversion", |
157 "-Wno-tautological-undefined-compare", | 181 "-Wno-tautological-undefined-compare", |
(...skipping 942 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1100 cflags += [ "-gsplit-dwarf" ] | 1124 cflags += [ "-gsplit-dwarf" ] |
1101 } | 1125 } |
1102 } | 1126 } |
1103 } | 1127 } |
1104 | 1128 |
1105 config("no_symbols") { | 1129 config("no_symbols") { |
1106 if (!is_win) { | 1130 if (!is_win) { |
1107 cflags = [ "-g0" ] | 1131 cflags = [ "-g0" ] |
1108 } | 1132 } |
1109 } | 1133 } |
OLD | NEW |