Chromium Code Reviews| Index: build/config/sanitizers/sanitizers.gni |
| diff --git a/build/config/sanitizers/sanitizers.gni b/build/config/sanitizers/sanitizers.gni |
| index 40ffb94d09885f6b6ed056860db472e0bc186bfe..132512d2529c50cd90ba692f3265dd8a79fe22ca 100644 |
| --- a/build/config/sanitizers/sanitizers.gni |
| +++ b/build/config/sanitizers/sanitizers.gni |
| @@ -2,6 +2,8 @@ |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| +import("//build/config/chrome_build.gni") |
| + |
| declare_args() { |
| # Compile for Address Sanitizer to find memory bugs. |
| is_asan = false |
| @@ -50,8 +52,9 @@ declare_args() { |
| # Compile with Control Flow Integrity to protect virtual calls and casts. |
| # See http://clang.llvm.org/docs/ControlFlowIntegrity.html |
| # |
| - # TODO(pcc): Remove this flag if/when CFI is enabled in official builds. |
| - is_cfi = false |
| + # TODO(pcc): Remove this flag if/when CFI is enabled in all official builds. |
| + is_cfi = target_os == "linux" && !is_chromeos && target_cpu == "x64" && |
| + is_chrome_branded && is_official_build |
|
Dirk Pranke
2016/08/19 20:22:09
Should we move this to //build/config/compiler/com
krasin
2016/08/19 20:30:45
Yes, theoretically it's worth discussing. But give
|
| # Enable checks for bad casts: derived cast and unrelated cast. |
| # TODO(krasin): remove this, when we're ready to add these checks by default. |