Index: build/config/compiler/BUILD.gn |
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn |
index de7167d7c2247532b32530ca1ea4c57fd2fbfeb6..e3dfffbacedc83b08e7cf963e773208abaeca049 100644 |
--- a/build/config/compiler/BUILD.gn |
+++ b/build/config/compiler/BUILD.gn |
@@ -848,8 +848,8 @@ config("rtti") { |
} |
} |
config("no_rtti") { |
- # CFI diagnostics require RTTI. |
- if (!use_cfi_diag) { |
+ # CFI diagnostics and UBsan vptr require RTTI. |
+ if (!use_cfi_diag && !is_ubsan_vptr) { |
if (is_win) { |
cflags_cc = [ "/GR-" ] |
} else { |