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 e91ed9c20f8f1..55ea7a01701ad 100644
|
||
|
--- a/build/config/compiler/BUILD.gn
|
||
|
+++ b/build/config/compiler/BUILD.gn
|
||
|
@@ -352,6 +352,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") {
|