Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(127)

Unified Diff: webrtc/BUILD.gn

Issue 3007153003: Enable UBSan float-cast-overflow warnings and fix existing ones (Closed)
Patch Set: Fix/silence existing warnings Created 3 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/BUILD.gn
diff --git a/webrtc/BUILD.gn b/webrtc/BUILD.gn
index 4216bd3de42197efef9020c4be6e409aa1cc2f08..210d2086df6def2ba24ce5928dad3f3990e19e61 100644
--- a/webrtc/BUILD.gn
+++ b/webrtc/BUILD.gn
@@ -93,6 +93,10 @@ config("common_inherited_config") {
ldflags += [ "-fsanitize-coverage=${rtc_sanitize_coverage}" ]
}
+ if (is_ubsan) {
+ cflags += [ "-fsanitize=float-cast-overflow" ]
+ }
+
# TODO(GYP): Support these in GN.
# if (is_bsd) {
# defines += [ "BSD" ]

Powered by Google App Engine
This is Rietveld 408576698