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

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

Issue 1841863002: Update monet. (Closed) Base URL: https://github.com/domokit/monet.git@master
Patch Set: Created 4 years, 8 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/nacl/config.gni ('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
(Empty)
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
3 # found in the LICENSE file.
4
5 import("//build/config/sanitizers/sanitizers.gni")
6
7 # Contains the dependencies needed for sanitizers to link into executables and
8 # shared_libraries. Unconditionally depend upon this target as it is empty if
9 # |is_asan|, |is_lsan|, |is_tsan|, |is_msan| and |use_custom_libcxx| are false.
10 group("deps") {
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) {
18 public_configs = [ ":sanitizer_options_link_helper" ]
19 deps += [ ":options_sources" ]
20 }
21 if (use_custom_libcxx) {
22 deps += [ "//buildtools/third_party/libc++:libcxx_proxy" ]
23 }
24 }
25
26 config("sanitizer_options_link_helper") {
27 ldflags = [ "-Wl,-u_sanitizer_options_link_helper" ]
28 if (is_asan) {
29 ldflags += [ "-fsanitize=address" ]
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 }
40 }
41
42 source_set("options_sources") {
43 visibility = [
44 ":deps",
45 "//:gn_visibility",
46 ]
47 sources = [
48 "//build/sanitizers/sanitizer_options.cc",
49 ]
50
51 if (is_asan) {
52 sources += [ "//build/sanitizers/asan_suppressions.cc" ]
53 }
54
55 if (is_lsan) {
56 sources += [ "//build/sanitizers/lsan_suppressions.cc" ]
57 }
58
59 if (is_tsan) {
60 sources += [ "//build/sanitizers/tsan_suppressions.cc" ]
61 }
62 }
OLDNEW
« no previous file with comments | « build/config/nacl/config.gni ('k') | build/config/sanitizers/sanitizers.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698