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

Side by Side Diff: build/config/compiler/BUILD.gn

Issue 1158643002: GN: Build with a custom libc++ when using ASAN, TSAN or MSAN. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gn-instrumented-libraries-prebuilt
Patch Set: Created 5 years, 7 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 unified diff | Download patch
« no previous file with comments | « no previous file | build/config/sanitizers/BUILD.gn » ('j') | build/config/sanitizers/BUILD.gn » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 ] 163 ]
164 } 164 }
165 if (is_msan) { 165 if (is_msan) {
166 msan_blacklist_path = 166 msan_blacklist_path =
167 rebase_path("//tools/msan/blacklist.txt", root_build_dir) 167 rebase_path("//tools/msan/blacklist.txt", root_build_dir)
168 cflags += [ 168 cflags += [
169 "-fsanitize=memory", 169 "-fsanitize=memory",
170 "-fsanitize-memory-track-origins=$msan_track_origins", 170 "-fsanitize-memory-track-origins=$msan_track_origins",
171 "-fsanitize-blacklist=$msan_blacklist_path", 171 "-fsanitize-blacklist=$msan_blacklist_path",
172 ] 172 ]
173 }
173 174
174 # TODO(GYP): Support custom libc++. 175 if (use_custom_libcxx) {
176 cflags_cc += [ "-nostdinc++" ]
177 include_dirs = [
178 "//buildtools/third_party/libc++/trunk/include",
179 "//buildtools/third_party/libc++abi/trunk/include",
180 ]
175 } 181 }
176 } 182 }
177 183
178 if (is_clang && is_debug) { 184 if (is_clang && is_debug) {
179 # Allow comparing the address of references and 'this' against 0 185 # Allow comparing the address of references and 'this' against 0
180 # in debug builds. Technically, these can never be null in 186 # in debug builds. Technically, these can never be null in
181 # well-defined C/C++ and Clang can optimize such checks away in 187 # well-defined C/C++ and Clang can optimize such checks away in
182 # release builds, but they may be used in asserts in debug builds. 188 # release builds, but they may be used in asserts in debug builds.
183 cflags_cc += [ 189 cflags_cc += [
184 "-Wno-undefined-bool-conversion", 190 "-Wno-undefined-bool-conversion",
(...skipping 954 matching lines...) Expand 10 before | Expand all | Expand 10 after
1139 cflags += [ "-gsplit-dwarf" ] 1145 cflags += [ "-gsplit-dwarf" ]
1140 } 1146 }
1141 } 1147 }
1142 } 1148 }
1143 1149
1144 config("no_symbols") { 1150 config("no_symbols") {
1145 if (!is_win) { 1151 if (!is_win) {
1146 cflags = [ "-g0" ] 1152 cflags = [ "-g0" ]
1147 } 1153 }
1148 } 1154 }
OLDNEW
« no previous file with comments | « no previous file | build/config/sanitizers/BUILD.gn » ('j') | build/config/sanitizers/BUILD.gn » ('J')

Powered by Google App Engine
This is Rietveld 408576698