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

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

Issue 2943863002: Set using_sanitizer if use_cfi_diag is true. (Closed)
Patch Set: Sanitizers not supported in official builds Created 3 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 | « no previous file | build/config/sanitizers/BUILD.gn » ('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 (c) 2013 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2013 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/android/config.gni") 5 import("//build/config/android/config.gni")
6 import("//build/config/chrome_build.gni") 6 import("//build/config/chrome_build.gni")
7 import("//build/config/chromecast_build.gni") 7 import("//build/config/chromecast_build.gni")
8 import("//build/config/compiler/compiler.gni") 8 import("//build/config/compiler/compiler.gni")
9 import("//build/toolchain/cc_wrapper.gni") 9 import("//build/toolchain/cc_wrapper.gni")
10 import("//build/toolchain/toolchain.gni") 10 import("//build/toolchain/toolchain.gni")
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 325
326 # Use pipes for communicating between sub-processes. Faster. 326 # Use pipes for communicating between sub-processes. Faster.
327 cflags += [ "-pipe" ] 327 cflags += [ "-pipe" ]
328 328
329 ldflags += [ 329 ldflags += [
330 "-Wl,-z,noexecstack", 330 "-Wl,-z,noexecstack",
331 "-Wl,-z,now", 331 "-Wl,-z,now",
332 "-Wl,-z,relro", 332 "-Wl,-z,relro",
333 ] 333 ]
334 if (!using_sanitizer) { 334 if (!using_sanitizer) {
335 if (!use_cfi_diag) { 335 ldflags += [ "-Wl,-z,defs" ]
336 ldflags += [ "-Wl,-z,defs" ]
337 }
338 336
339 # Functions interposed by the sanitizers can make ld think 337 # Functions interposed by the sanitizers can make ld think
340 # that some libraries aren't needed when they actually are, 338 # that some libraries aren't needed when they actually are,
341 # http://crbug.com/234010. As workaround, disable --as-needed. 339 # http://crbug.com/234010. As workaround, disable --as-needed.
342 if (!is_nacl && !is_android) { 340 if (!is_nacl && !is_android) {
343 # TODO(pcc): Fix linker bug which requires us to link pthread 341 # TODO(pcc): Fix linker bug which requires us to link pthread
344 # unconditionally here (crbug.com/623236). 342 # unconditionally here (crbug.com/623236).
345 ldflags += [ 343 ldflags += [
346 "-Wl,--no-as-needed", 344 "-Wl,--no-as-needed",
347 "-lpthread", 345 "-lpthread",
(...skipping 1464 matching lines...) Expand 10 before | Expand all | Expand 10 after
1812 1810
1813 if (is_ios || is_mac) { 1811 if (is_ios || is_mac) {
1814 # On Mac and iOS, this enables support for ARC (automatic ref-counting). 1812 # On Mac and iOS, this enables support for ARC (automatic ref-counting).
1815 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. 1813 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html.
1816 config("enable_arc") { 1814 config("enable_arc") {
1817 common_flags = [ "-fobjc-arc" ] 1815 common_flags = [ "-fobjc-arc" ]
1818 cflags_objc = common_flags 1816 cflags_objc = common_flags
1819 cflags_objcc = common_flags 1817 cflags_objcc = common_flags
1820 } 1818 }
1821 } 1819 }
OLDNEW
« no previous file with comments | « no previous file | build/config/sanitizers/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698