25 lines
843 B
Diff
25 lines
843 B
Diff
|
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") {
|