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

Side by Side Diff: build/config/sanitizers/sanitizers.gni

Issue 2858723002: allow_posix_link_time_opt and is_cfi are clang features (Closed)
Patch Set: Created 3 years, 7 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 | 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 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 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/toolchain/toolchain.gni") 6 import("//build/toolchain/toolchain.gni")
7 7
8 declare_args() { 8 declare_args() {
9 # Compile for Address Sanitizer to find memory bugs. 9 # Compile for Address Sanitizer to find memory bugs.
10 is_asan = false 10 is_asan = false
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 # Enable building with SyzyAsan which can find certain types of memory 48 # Enable building with SyzyAsan which can find certain types of memory
49 # errors. Only works on Windows. See 49 # errors. Only works on Windows. See
50 # https://github.com/google/syzygy/wiki/SyzyASanHowTo 50 # https://github.com/google/syzygy/wiki/SyzyASanHowTo
51 is_syzyasan = false 51 is_syzyasan = false
52 52
53 # Compile with Control Flow Integrity to protect virtual calls and casts. 53 # Compile with Control Flow Integrity to protect virtual calls and casts.
54 # See http://clang.llvm.org/docs/ControlFlowIntegrity.html 54 # See http://clang.llvm.org/docs/ControlFlowIntegrity.html
55 # 55 #
56 # TODO(pcc): Remove this flag if/when CFI is enabled in all official builds. 56 # TODO(pcc): Remove this flag if/when CFI is enabled in all official builds.
57 is_cfi = target_os == "linux" && !is_chromeos && target_cpu == "x64" && 57 is_cfi = target_os == "linux" && !is_chromeos && target_cpu == "x64" &&
58 is_official_build && allow_posix_link_time_opt 58 is_official_build && allow_posix_link_time_opt && is_clang
krasin1 2017/05/02 19:48:23 allow_posix_link_time is a clang feature. Can you
Mostyn Bramley-Moore 2017/05/02 19:55:34 Thanks- I was testing that change simultaneously i
59 59
60 # Enable checks for bad casts: derived cast and unrelated cast. 60 # Enable checks for bad casts: derived cast and unrelated cast.
61 # TODO(krasin): remove this, when we're ready to add these checks by default. 61 # TODO(krasin): remove this, when we're ready to add these checks by default.
62 # https://crbug.com/626794 62 # https://crbug.com/626794
63 use_cfi_cast = false 63 use_cfi_cast = false
64 64
65 # Enable checks for indirect function calls via a function pointer. 65 # Enable checks for indirect function calls via a function pointer.
66 # TODO(pcc): remove this when we're ready to add these checks by default. 66 # TODO(pcc): remove this when we're ready to add these checks by default.
67 # https://crbug.com/701919 67 # https://crbug.com/701919
68 use_cfi_icall = false 68 use_cfi_icall = false
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 assert(!is_debug || !(is_msan || is_ubsan || is_ubsan_null || is_ubsan_vptr), 194 assert(!is_debug || !(is_msan || is_ubsan || is_ubsan_null || is_ubsan_vptr),
195 "Sanitizers should generally be used in release (set is_debug=false).") 195 "Sanitizers should generally be used in release (set is_debug=false).")
196 196
197 assert(!is_msan || (is_linux && current_cpu == "x64"), 197 assert(!is_msan || (is_linux && current_cpu == "x64"),
198 "MSan currently only works on 64-bit Linux and ChromeOS builds.") 198 "MSan currently only works on 64-bit Linux and ChromeOS builds.")
199 199
200 # ASAN build on Windows is not working in debug mode. Intercepting memory 200 # ASAN build on Windows is not working in debug mode. Intercepting memory
201 # allocation functions is hard on Windows and not yet implemented in LLVM. 201 # allocation functions is hard on Windows and not yet implemented in LLVM.
202 assert(!is_win || !is_debug || !is_asan, 202 assert(!is_win || !is_debug || !is_asan,
203 "ASan on Windows doesn't work in debug (set is_debug=false).") 203 "ASan on Windows doesn't work in debug (set is_debug=false).")
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