OLD | NEW |
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 declare_args() { | 5 declare_args() { |
6 # Compile for Address Sanitizer to find memory bugs. | 6 # Compile for Address Sanitizer to find memory bugs. |
7 is_asan = false | 7 is_asan = false |
8 | 8 |
9 # Compile for Leak Sanitizer to find leaks. | 9 # Compile for Leak Sanitizer to find leaks. |
10 is_lsan = false | 10 is_lsan = false |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 # Compile with Control Flow Integrity to protect virtual calls and casts. | 46 # Compile with Control Flow Integrity to protect virtual calls and casts. |
47 # See http://clang.llvm.org/docs/ControlFlowIntegrity.html | 47 # See http://clang.llvm.org/docs/ControlFlowIntegrity.html |
48 # | 48 # |
49 # TODO(pcc): Remove this flag if/when CFI is enabled in official builds. | 49 # TODO(pcc): Remove this flag if/when CFI is enabled in official builds. |
50 is_cfi = false | 50 is_cfi = false |
51 | 51 |
52 # By default, Control Flow Integrity will crash the program if it detects a | 52 # By default, Control Flow Integrity will crash the program if it detects a |
53 # violation. Set this to true to print detailed diagnostics instead. | 53 # violation. Set this to true to print detailed diagnostics instead. |
54 use_cfi_diag = false | 54 use_cfi_diag = false |
55 | 55 |
| 56 use_cfi_cast = true |
| 57 |
56 # Compile for fuzzing with LLVM LibFuzzer. | 58 # Compile for fuzzing with LLVM LibFuzzer. |
57 # See http://www.chromium.org/developers/testing/libfuzzer | 59 # See http://www.chromium.org/developers/testing/libfuzzer |
58 use_libfuzzer = false | 60 use_libfuzzer = false |
59 | 61 |
60 # Compile for fuzzing with AFL. | 62 # Compile for fuzzing with AFL. |
61 use_afl = false | 63 use_afl = false |
62 | 64 |
63 # Enables core ubsan security features. Will later be removed once it matches | 65 # Enables core ubsan security features. Will later be removed once it matches |
64 # is_ubsan. | 66 # is_ubsan. |
65 is_ubsan_security = false | 67 is_ubsan_security = false |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 # | 123 # |
122 # If you find a use-case where you want to compile a sanitizer in debug mode | 124 # If you find a use-case where you want to compile a sanitizer in debug mode |
123 # and have verified it works, ask brettw and we can consider removing it from | 125 # and have verified it works, ask brettw and we can consider removing it from |
124 # this condition. We may also be able to find another way to enable your case | 126 # this condition. We may also be able to find another way to enable your case |
125 # without having people accidentally get broken builds by compiling an | 127 # without having people accidentally get broken builds by compiling an |
126 # unsupported or unadvisable configurations. | 128 # unsupported or unadvisable configurations. |
127 # | 129 # |
128 # For one-off testing, just comment this assertion out. | 130 # For one-off testing, just comment this assertion out. |
129 assert(!is_debug || !(is_msan || is_ubsan || is_ubsan_null || is_ubsan_vptr), | 131 assert(!is_debug || !(is_msan || is_ubsan || is_ubsan_null || is_ubsan_vptr), |
130 "Sanitizers should generally be used in release (set is_debug=false).") | 132 "Sanitizers should generally be used in release (set is_debug=false).") |
OLD | NEW |