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

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

Issue 1507873002: roll clang 254049:254793 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years 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
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/chrome_build.gni") 5 import("//build/config/chrome_build.gni")
6 import("//build/config/sanitizers/sanitizers.gni") 6 import("//build/config/sanitizers/sanitizers.gni")
7 7
8 # Contains the dependencies needed for sanitizers to link into executables and 8 # Contains the dependencies needed for sanitizers to link into executables and
9 # shared_libraries. Unconditionally depend upon this target as it is empty if 9 # shared_libraries. Unconditionally depend upon this target as it is empty if
10 # |is_asan|, |is_lsan|, |is_tsan|, |is_msan| and |use_custom_libcxx| are false. 10 # |is_asan|, |is_lsan|, |is_tsan|, |is_msan| and |use_custom_libcxx| are false.
(...skipping 18 matching lines...) Expand all
29 if (is_asan) { 29 if (is_asan) {
30 ldflags += [ "-fsanitize=address" ] 30 ldflags += [ "-fsanitize=address" ]
31 } 31 }
32 if (is_lsan) { 32 if (is_lsan) {
33 ldflags += [ "-fsanitize=leak" ] 33 ldflags += [ "-fsanitize=leak" ]
34 } 34 }
35 if (is_tsan) { 35 if (is_tsan) {
36 ldflags += [ "-fsanitize=thread" ] 36 ldflags += [ "-fsanitize=thread" ]
37 } 37 }
38 if (is_msan) { 38 if (is_msan) {
39 ldflags += [ 39 ldflags += [ "-fsanitize=memory" ]
40 "-fsanitize=memory",
41
42 # TODO(eugenis): Remove when msan migrates to new ABI (crbug.com/560589).
43 "-pie",
44 ]
45 } 40 }
46 if (is_ubsan) { 41 if (is_ubsan) {
47 ldflags += [ "-fsanitize=undefined" ] 42 ldflags += [ "-fsanitize=undefined" ]
48 } 43 }
49 if (is_ubsan_vptr) { 44 if (is_ubsan_vptr) {
50 ldflags += [ "-fsanitize=vptr" ] 45 ldflags += [ "-fsanitize=vptr" ]
51 } 46 }
52 } 47 }
53 48
54 source_set("options_sources") { 49 source_set("options_sources") {
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 "-fsanitize-blacklist=$tsan_blacklist_path", 132 "-fsanitize-blacklist=$tsan_blacklist_path",
138 ] 133 ]
139 } 134 }
140 if (is_msan) { 135 if (is_msan) {
141 msan_blacklist_path = 136 msan_blacklist_path =
142 rebase_path("//tools/msan/blacklist.txt", root_build_dir) 137 rebase_path("//tools/msan/blacklist.txt", root_build_dir)
143 cflags += [ 138 cflags += [
144 "-fsanitize=memory", 139 "-fsanitize=memory",
145 "-fsanitize-memory-track-origins=$msan_track_origins", 140 "-fsanitize-memory-track-origins=$msan_track_origins",
146 "-fsanitize-blacklist=$msan_blacklist_path", 141 "-fsanitize-blacklist=$msan_blacklist_path",
147
148 # TODO(eugenis): Remove when msan migrates to new ABI (crbug.com/560589) .
149 "-fPIC",
150 ] 142 ]
151 } 143 }
152 if (is_ubsan) { 144 if (is_ubsan) {
153 ubsan_blacklist_path = 145 ubsan_blacklist_path =
154 rebase_path("//tools/ubsan/blacklist.txt", root_build_dir) 146 rebase_path("//tools/ubsan/blacklist.txt", root_build_dir)
155 cflags += [ 147 cflags += [
156 # Yasm dies with an "Illegal instruction" error when bounds checking is 148 # Yasm dies with an "Illegal instruction" error when bounds checking is
157 # enabled. See http://crbug.com/489901 149 # enabled. See http://crbug.com/489901
158 # "-fsanitize=bounds", 150 # "-fsanitize=bounds",
159 "-fsanitize=float-divide-by-zero", 151 "-fsanitize=float-divide-by-zero",
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 242
251 config("default_sanitizer_coverage_flags") { 243 config("default_sanitizer_coverage_flags") {
252 cflags = [] 244 cflags = []
253 245
254 if (use_sanitizer_coverage) { 246 if (use_sanitizer_coverage) {
255 # FIXME: make this configurable. 247 # FIXME: make this configurable.
256 cflags += 248 cflags +=
257 [ "-fsanitize-coverage=edge,indirect-calls,8bit-counters,trace-cmp" ] 249 [ "-fsanitize-coverage=edge,indirect-calls,8bit-counters,trace-cmp" ]
258 } 250 }
259 } 251 }
OLDNEW
« no previous file with comments | « build/common.gypi ('k') | third_party/instrumented_libraries/binaries/msan-chained-origins-precise.tgz.sha1 » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698