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

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

Issue 1180693002: Update from https://crrev.com/333737 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: rebased 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/ios/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 # Contains the dependencies needed for asan to link into executables and 5 import("//build/config/sanitizers/sanitizers.gni")
6
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 false. 9 # |is_asan|, |is_lsan|, |is_tsan|, |is_msan| and |use_custom_libcxx| are false.
8 group("deps") { 10 group("deps") {
9 if (is_asan) { 11 # TODO(vtl): Chromium has the following (but we don't have
12 # instrumented_libraries).
13 # deps = [
14 # "//third_party/instrumented_libraries:deps",
15 # ]
16 deps = []
17 if (is_asan || is_lsan || is_tsan || is_msan) {
10 public_configs = [ ":sanitizer_options_link_helper" ] 18 public_configs = [ ":sanitizer_options_link_helper" ]
11 deps = [ 19 deps += [ ":options_sources" ]
12 ":options_sources", 20 }
13 ] 21 if (use_custom_libcxx) {
22 deps += [ "//buildtools/third_party/libc++:libcxx_proxy" ]
14 } 23 }
15 } 24 }
16 25
17 config("sanitizer_options_link_helper") { 26 config("sanitizer_options_link_helper") {
18 ldflags = [ 27 ldflags = [ "-Wl,-u_sanitizer_options_link_helper" ]
19 "-Wl,-u_sanitizer_options_link_helper", 28 if (is_asan) {
20 "-fsanitize=address", 29 ldflags += [ "-fsanitize=address" ]
21 ] 30 }
31 if (is_lsan) {
32 ldflags += [ "-fsanitize=leak" ]
33 }
34 if (is_tsan) {
35 ldflags += [ "-fsanitize=thread" ]
36 }
37 if (is_msan) {
38 ldflags += [ "-fsanitize=memory" ]
39 }
22 } 40 }
23 41
24 source_set("options_sources") { 42 source_set("options_sources") {
25 visibility = [ 43 visibility = [
26 ":deps", 44 ":deps",
27 "//:gn_visibility", 45 "//:gn_visibility",
28 ] 46 ]
29 sources = [ 47 sources = [
30 "//build/sanitizers/sanitizer_options.cc", 48 "//build/sanitizers/sanitizer_options.cc",
31 ] 49 ]
32 50
33 if (is_asan) { 51 if (is_asan) {
34 sources += [ "//build/sanitizers/asan_suppressions.cc" ] 52 sources += [ "//build/sanitizers/asan_suppressions.cc" ]
35 } 53 }
36 54
55 if (is_lsan) {
56 sources += [ "//build/sanitizers/lsan_suppressions.cc" ]
57 }
58
37 if (is_tsan) { 59 if (is_tsan) {
38 sources += [ "//build/sanitizers/tsan_suppressions.cc" ] 60 sources += [ "//build/sanitizers/tsan_suppressions.cc" ]
39 } 61 }
40 } 62 }
OLDNEW
« no previous file with comments | « build/config/ios/BUILD.gn ('k') | build/config/sanitizers/sanitizers.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698