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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 # errors. Only works on Windows. See | 42 # errors. Only works on Windows. See |
43 # https://github.com/google/syzygy/wiki/SyzyASanHowTo | 43 # https://github.com/google/syzygy/wiki/SyzyASanHowTo |
44 is_syzyasan = false | 44 is_syzyasan = false |
45 | 45 |
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 # Enable checks for bad casts: derived cast and unrelated cast. |
| 53 # TODO(krasin): remove this, when we're ready to add these checks by default. |
| 54 # https://crbug.com/626794 |
| 55 use_cfi_cast = false |
| 56 |
52 # By default, Control Flow Integrity will crash the program if it detects a | 57 # By default, Control Flow Integrity will crash the program if it detects a |
53 # violation. Set this to true to print detailed diagnostics instead. | 58 # violation. Set this to true to print detailed diagnostics instead. |
54 use_cfi_diag = false | 59 use_cfi_diag = false |
55 | 60 |
56 # Compile for fuzzing with LLVM LibFuzzer. | 61 # Compile for fuzzing with LLVM LibFuzzer. |
57 # See http://www.chromium.org/developers/testing/libfuzzer | 62 # See http://www.chromium.org/developers/testing/libfuzzer |
58 use_libfuzzer = false | 63 use_libfuzzer = false |
59 | 64 |
60 # Compile for fuzzing with AFL. | 65 # Compile for fuzzing with AFL. |
61 use_afl = false | 66 use_afl = false |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 # | 126 # |
122 # If you find a use-case where you want to compile a sanitizer in debug mode | 127 # 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 | 128 # 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 | 129 # 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 | 130 # without having people accidentally get broken builds by compiling an |
126 # unsupported or unadvisable configurations. | 131 # unsupported or unadvisable configurations. |
127 # | 132 # |
128 # For one-off testing, just comment this assertion out. | 133 # For one-off testing, just comment this assertion out. |
129 assert(!is_debug || !(is_msan || is_ubsan || is_ubsan_null || is_ubsan_vptr), | 134 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).") | 135 "Sanitizers should generally be used in release (set is_debug=false).") |
OLD | NEW |