| 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 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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 # this condition. We may also be able to find another way to enable your case | 177 # this condition. We may also be able to find another way to enable your case |
| 178 # without having people accidentally get broken builds by compiling an | 178 # without having people accidentally get broken builds by compiling an |
| 179 # unsupported or unadvisable configurations. | 179 # unsupported or unadvisable configurations. |
| 180 # | 180 # |
| 181 # For one-off testing, just comment this assertion out. | 181 # For one-off testing, just comment this assertion out. |
| 182 assert(!is_debug || !(is_msan || is_ubsan || is_ubsan_null || is_ubsan_vptr), | 182 assert(!is_debug || !(is_msan || is_ubsan || is_ubsan_null || is_ubsan_vptr), |
| 183 "Sanitizers should generally be used in release (set is_debug=false).") | 183 "Sanitizers should generally be used in release (set is_debug=false).") |
| 184 | 184 |
| 185 assert(!is_msan || (is_linux && current_cpu == "x64"), | 185 assert(!is_msan || (is_linux && current_cpu == "x64"), |
| 186 "MSan currently only works on 64-bit Linux and ChromeOS builds.") | 186 "MSan currently only works on 64-bit Linux and ChromeOS builds.") |
| 187 |
| 188 # ASAN build on Windows is not working in debug mode. Intercepting memory |
| 189 # allocation functions is hard on Windows and not yet implemented in LLVM. |
| 190 assert(!is_win || !is_debug || !is_asan, |
| 191 "ASan on Windows doesn't work in debug (set is_debug=false).") |
| OLD | NEW |