28 lines
946 B
Diff
28 lines
946 B
Diff
--- b/build/config/compiler/BUILD.gn
|
|
+++ a/build/config/compiler/BUILD.gn
|
|
@@ -1920,24 +1920,6 @@
|
|
}
|
|
}
|
|
|
|
-# Enable UBSan subset to ensure we always hit `return` statement in non-void
|
|
-# functions (https://crbug.com/489565636). This is equivalent to inserting
|
|
-# `NOTREACHED()` at the end of such functions.
|
|
-config("sanitize_return") {
|
|
- if (!is_ubsan && is_clang) {
|
|
- cflags = [
|
|
- "-fsanitize=return",
|
|
- "-fsanitize-trap=return",
|
|
-
|
|
- # Some code users feature detection to determine if UBSAN (or any
|
|
- # sanitizer) is enabled, they then do expensive debug like operations. We
|
|
- # want to suppress this behaviour since we want to keep performance costs
|
|
- # as low as possible while having these checks.
|
|
- "-fsanitize-ignore-for-ubsan-feature=return",
|
|
- ]
|
|
- }
|
|
-}
|
|
-
|
|
config("rustc_revision") {
|
|
if (rustc_revision != "") {
|
|
# Similar to the `clang_revision` config, this is here so that all `.rs`
|