LeOSium_webview/mulch/patches/0001-Vanadium/0005-enable-ftrivial-auto-v...

25 lines
843 B
Diff
Raw Normal View History

2023-11-18 11:46:19 +01:00
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Wed, 8 Apr 2020 20:48:17 -0400
Subject: [PATCH] enable -ftrivial-auto-var-init=zero
---
build/config/compiler/BUILD.gn | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index 9765e5e9ce601..c417df03d536f 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -393,6 +393,10 @@ config("compiler") {
cflags += [ "-fwrapv" ]
}
+ if (is_clang) {
+ cflags += [ "-ftrivial-auto-var-init=zero", "-enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang" ]
+ }
+
# Linker warnings.
if (fatal_linker_warnings && !is_apple && current_os != "aix" &&
current_os != "zos") {