OLD | NEW |
---|---|
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 # ============================================================================= | 5 # ============================================================================= |
6 # PLATFORM SELECTION | 6 # PLATFORM SELECTION |
7 # ============================================================================= | 7 # ============================================================================= |
8 # | 8 # |
9 # There are two main things to set: "os" and "cpu". The "toolchain" is the name | 9 # There are two main things to set: "os" and "cpu". The "toolchain" is the name |
10 # of the GN thing that encodes combinations of these things. | 10 # of the GN thing that encodes combinations of these things. |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
138 | 138 |
139 # Compile for Leak Sanitizer to find leaks. | 139 # Compile for Leak Sanitizer to find leaks. |
140 is_lsan = false | 140 is_lsan = false |
141 | 141 |
142 # Compile for Memory Sanitizer to find uninitialized reads. | 142 # Compile for Memory Sanitizer to find uninitialized reads. |
143 is_msan = false | 143 is_msan = false |
144 | 144 |
145 # Compile for Thread Sanitizer to find threading bugs. | 145 # Compile for Thread Sanitizer to find threading bugs. |
146 is_tsan = false | 146 is_tsan = false |
147 | 147 |
148 # Compile with Control Flow Integrity to protect virtual calls and casts. | |
149 # See http://clang.llvm.org/docs/ControlFlowIntegrity.html | |
150 is_cfi = false | |
brettw
2015/09/03 04:41:20
I was thinking of removing the *san flags from her
pcc1
2015/09/04 21:56:59
Done.
| |
151 | |
152 # Whether Control Flow Integrity prints diagnostics instead of crashing. | |
153 use_cfi_diag = false | |
154 | |
148 if (current_os == "chromeos") { | 155 if (current_os == "chromeos") { |
149 # Allows the target toolchain to be injected as arguments. This is needed | 156 # Allows the target toolchain to be injected as arguments. This is needed |
150 # to support the CrOS build system which supports per-build-configuration | 157 # to support the CrOS build system which supports per-build-configuration |
151 # toolchains. | 158 # toolchains. |
152 cros_use_custom_toolchain = false | 159 cros_use_custom_toolchain = false |
153 } | 160 } |
154 | 161 |
155 # DON'T ADD MORE FLAGS HERE. Read the comment above. | 162 # DON'T ADD MORE FLAGS HERE. Read the comment above. |
156 } | 163 } |
157 | 164 |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
431 _default_optimization_config = "//build/config/compiler:optimize" | 438 _default_optimization_config = "//build/config/compiler:optimize" |
432 } | 439 } |
433 _native_compiler_configs += [ _default_optimization_config ] | 440 _native_compiler_configs += [ _default_optimization_config ] |
434 | 441 |
435 # If it wasn't manually set, set to an appropriate default. | 442 # If it wasn't manually set, set to an appropriate default. |
436 if (symbol_level == -1) { | 443 if (symbol_level == -1) { |
437 # Linux is slowed by having symbols as part of the target binary, whereas | 444 # Linux is slowed by having symbols as part of the target binary, whereas |
438 # Mac and Windows have them separate, so in Release Linux, default them off. | 445 # Mac and Windows have them separate, so in Release Linux, default them off. |
439 if (is_debug || !is_linux) { | 446 if (is_debug || !is_linux) { |
440 symbol_level = 2 | 447 symbol_level = 2 |
441 } else if (is_asan || is_lsan || is_tsan || is_msan) { | 448 } else if (is_asan || is_lsan || is_tsan || is_msan || is_cfi) { |
442 # Sanitizers require symbols for filename suppressions to work. | 449 # Sanitizers require symbols for filename suppressions to work. |
443 symbol_level = 1 | 450 symbol_level = 1 |
444 } else { | 451 } else { |
445 symbol_level = 0 | 452 symbol_level = 0 |
446 } | 453 } |
447 } | 454 } |
448 | 455 |
449 # Symbol setup. | 456 # Symbol setup. |
450 if (symbol_level == 2) { | 457 if (symbol_level == 2) { |
451 _default_symbols_config = "//build/config/compiler:symbols" | 458 _default_symbols_config = "//build/config/compiler:symbols" |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
618 forward_variables_from(invoker, "*") | 625 forward_variables_from(invoker, "*") |
619 | 626 |
620 # All shared libraries must have the sanitizer deps to properly link in | 627 # All shared libraries must have the sanitizer deps to properly link in |
621 # asan mode (this target will be empty in other cases). | 628 # asan mode (this target will be empty in other cases). |
622 if (!defined(deps)) { | 629 if (!defined(deps)) { |
623 deps = [] | 630 deps = [] |
624 } | 631 } |
625 deps += [ "//build/config/sanitizers:deps" ] | 632 deps += [ "//build/config/sanitizers:deps" ] |
626 } | 633 } |
627 } | 634 } |
OLD | NEW |