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

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

Issue 1491113002: Fix CFI buildbot: import chrome_build.gni for is_official_build. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: include-what-you-use + fmt 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
« no previous file with comments | « no previous file | no next file » | 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/chrome_build.gni")
5 import("//build/config/sanitizers/sanitizers.gni") 6 import("//build/config/sanitizers/sanitizers.gni")
6 7
7 # Contains the dependencies needed for sanitizers to link into executables and 8 # 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 # 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 # |is_asan|, |is_lsan|, |is_tsan|, |is_msan| and |use_custom_libcxx| are false.
10 group("deps") { 11 group("deps") {
11 if (using_sanitizer) { 12 if (using_sanitizer) {
12 public_configs = [ ":sanitizer_options_link_helper" ] 13 public_configs = [ ":sanitizer_options_link_helper" ]
13 deps = [ 14 deps = [
14 ":options_sources", 15 ":options_sources",
(...skipping 15 matching lines...) Expand all
30 } 31 }
31 if (is_lsan) { 32 if (is_lsan) {
32 ldflags += [ "-fsanitize=leak" ] 33 ldflags += [ "-fsanitize=leak" ]
33 } 34 }
34 if (is_tsan) { 35 if (is_tsan) {
35 ldflags += [ "-fsanitize=thread" ] 36 ldflags += [ "-fsanitize=thread" ]
36 } 37 }
37 if (is_msan) { 38 if (is_msan) {
38 ldflags += [ 39 ldflags += [
39 "-fsanitize=memory", 40 "-fsanitize=memory",
41
40 # TODO(eugenis): Remove when msan migrates to new ABI (crbug.com/560589). 42 # TODO(eugenis): Remove when msan migrates to new ABI (crbug.com/560589).
41 "-pie", 43 "-pie",
42 ] 44 ]
43 } 45 }
44 if (is_ubsan) { 46 if (is_ubsan) {
45 ldflags += [ "-fsanitize=undefined" ] 47 ldflags += [ "-fsanitize=undefined" ]
46 } 48 }
47 if (is_ubsan_vptr) { 49 if (is_ubsan_vptr) {
48 ldflags += [ "-fsanitize=vptr" ] 50 ldflags += [ "-fsanitize=vptr" ]
49 } 51 }
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 "-fsanitize-blacklist=$tsan_blacklist_path", 137 "-fsanitize-blacklist=$tsan_blacklist_path",
136 ] 138 ]
137 } 139 }
138 if (is_msan) { 140 if (is_msan) {
139 msan_blacklist_path = 141 msan_blacklist_path =
140 rebase_path("//tools/msan/blacklist.txt", root_build_dir) 142 rebase_path("//tools/msan/blacklist.txt", root_build_dir)
141 cflags += [ 143 cflags += [
142 "-fsanitize=memory", 144 "-fsanitize=memory",
143 "-fsanitize-memory-track-origins=$msan_track_origins", 145 "-fsanitize-memory-track-origins=$msan_track_origins",
144 "-fsanitize-blacklist=$msan_blacklist_path", 146 "-fsanitize-blacklist=$msan_blacklist_path",
147
145 # TODO(eugenis): Remove when msan migrates to new ABI (crbug.com/560589) . 148 # TODO(eugenis): Remove when msan migrates to new ABI (crbug.com/560589) .
146 "-fPIC", 149 "-fPIC",
147 ] 150 ]
148 } 151 }
149 if (is_ubsan) { 152 if (is_ubsan) {
150 ubsan_blacklist_path = 153 ubsan_blacklist_path =
151 rebase_path("//tools/ubsan/blacklist.txt", root_build_dir) 154 rebase_path("//tools/ubsan/blacklist.txt", root_build_dir)
152 cflags += [ 155 cflags += [
153 # Yasm dies with an "Illegal instruction" error when bounds checking is 156 # Yasm dies with an "Illegal instruction" error when bounds checking is
154 # enabled. See http://crbug.com/489901 157 # enabled. See http://crbug.com/489901
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 250
248 config("default_sanitizer_coverage_flags") { 251 config("default_sanitizer_coverage_flags") {
249 cflags = [] 252 cflags = []
250 253
251 if (use_sanitizer_coverage) { 254 if (use_sanitizer_coverage) {
252 # FIXME: make this configurable. 255 # FIXME: make this configurable.
253 cflags += 256 cflags +=
254 [ "-fsanitize-coverage=edge,indirect-calls,8bit-counters,trace-cmp" ] 257 [ "-fsanitize-coverage=edge,indirect-calls,8bit-counters,trace-cmp" ]
255 } 258 }
256 } 259 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698