Index: build/config/sanitizers/sanitizers.gni |
diff --git a/build/config/sanitizers/sanitizers.gni b/build/config/sanitizers/sanitizers.gni |
index 16117223110eed8bbd8c2669aeae1e05267de8ad..ba1aec4833e0fc3d2868e92d8d47345743669e43 100644 |
--- a/build/config/sanitizers/sanitizers.gni |
+++ b/build/config/sanitizers/sanitizers.gni |
@@ -90,6 +90,30 @@ declare_args() { |
sanitizer_coverage_flags = "" |
} |
+# Disable sanitizers for non-default toolchains. |
+if (current_toolchain != default_toolchain) { |
+ is_asan = false |
+ is_cfi = false |
+ is_lsan = false |
+ is_msan = false |
+ is_syzyasan = false |
+ is_tsan = false |
+ is_ubsan = false |
+ is_ubsan_null = false |
+ is_ubsan_no_recover = false |
+ is_ubsan_security = false |
+ is_ubsan_vptr = false |
+ msan_track_origins = 0 |
+ sanitizer_coverage_flags = "" |
+ use_cfi_diag = false |
+ use_custom_libcxx = false |
+ use_drfuzz = false |
+ use_libfuzzer = false |
+ use_prebuilt_instrumented_libraries = false |
+ use_locally_built_instrumented_libraries = false |
+ use_sanitizer_coverage = false |
+} |
+ |
# Args that are in turn dependent on other args must be in a separate |
# declare_args block. User overrides are only applied at the end of a |
# declare_args block. |