LeOSium_webview/LeOS/patches/enable-ftrivial-auto-var-in...

27 lines
896 B
Diff

From: Daniel Micay <danielmicay@gmail.com>
Date: Wed, 8 Apr 2020 20:48:17 -0400
Subject: enable -ftrivial-auto-var-init=zero
Original License: MIT - https://spdx.org/licenses/MIT.html
License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
---
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
--- 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", "-Wno-unused-command-line-argument" ]
+ }
+
# Linker warnings.
if (fatal_linker_warnings && !is_apple && current_os != "aix" &&
current_os != "zos") {
--
2.25.1