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

27 lines
896 B
Diff
Raw Normal View History

2023-11-18 11:46:19 +01:00
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