From: Daniel Micay 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 @@ -440,6 +440,10 @@ config("compiler") { # -------------------------------- cflags += [ "-fno-strict-aliasing" ] # See http://crbug.com/32204 + if (is_clang) { + cflags += [ "-ftrivial-auto-var-init=zero", "-Wno-unused-command-line-argument" ] + } + # Stack protection. ShadowCallStack and Stack protector address the same # problems. Therefore, we only enable one or the other. Clang advertises SCS as # a stronger alternative to StackProtector, so we give SCS precedence over SP. --