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

Side by Side Diff: build/config/sanitizers/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: rebase Created 5 years, 6 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 | « build/config/compiler/BUILD.gn ('k') | build/config/sanitizers/sanitizers.gni » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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/sanitizers/sanitizers.gni")
6
5 # Contains the dependencies needed for sanitizers to link into executables and 7 # Contains the dependencies needed for sanitizers to link into executables and
6 # shared_libraries. Unconditionally depend upon this target as it is empty if 8 # shared_libraries. Unconditionally depend upon this target as it is empty if
7 # |is_asan|, |is_lsan|, |is_tsan| and |is_msan| are false. 9 # |is_asan|, |is_lsan|, |is_tsan|, |is_msan| and |use_custom_libcxx| are false.
8 group("deps") { 10 group("deps") {
11 deps = []
9 if (is_asan || is_lsan || is_tsan || is_msan) { 12 if (is_asan || is_lsan || is_tsan || is_msan) {
10 public_configs = [ ":sanitizer_options_link_helper" ] 13 public_configs = [ ":sanitizer_options_link_helper" ]
11 deps = [ 14 deps += [ ":options_sources" ]
12 ":options_sources", 15 }
13 ] 16 if (use_custom_libcxx) {
17 deps += [ "//buildtools/third_party/libc++:libcxx_proxy" ]
14 } 18 }
15 } 19 }
16 20
17 config("sanitizer_options_link_helper") { 21 config("sanitizer_options_link_helper") {
18 ldflags = [ "-Wl,-u_sanitizer_options_link_helper" ] 22 ldflags = [ "-Wl,-u_sanitizer_options_link_helper" ]
19 if (is_asan) { 23 if (is_asan) {
20 ldflags += [ "-fsanitize=address" ] 24 ldflags += [ "-fsanitize=address" ]
21 } 25 }
22 if (is_lsan) { 26 if (is_lsan) {
23 ldflags += [ "-fsanitize=leak" ] 27 ldflags += [ "-fsanitize=leak" ]
(...skipping 20 matching lines...) Expand all
44 } 48 }
45 49
46 if (is_lsan) { 50 if (is_lsan) {
47 sources += [ "//build/sanitizers/lsan_suppressions.cc" ] 51 sources += [ "//build/sanitizers/lsan_suppressions.cc" ]
48 } 52 }
49 53
50 if (is_tsan) { 54 if (is_tsan) {
51 sources += [ "//build/sanitizers/tsan_suppressions.cc" ] 55 sources += [ "//build/sanitizers/tsan_suppressions.cc" ]
52 } 56 }
53 } 57 }
OLDNEW
« no previous file with comments | « build/config/compiler/BUILD.gn ('k') | build/config/sanitizers/sanitizers.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698