Default to zero-initialization instead of pattern.
Bug: http://b/154169005
Test: Built blueline and ran some CTS tests.
Change-Id: Ie5e45619096cdcd0b52d01ece65e7f0233b2a3c8
(cherry picked from commit 7871416eec
)
This commit is contained in:
parent
a7a30b63e9
commit
66467b44b8
1 changed files with 3 additions and 3 deletions
|
@ -162,7 +162,7 @@ func init() {
|
|||
|
||||
// http://b/131390872
|
||||
// Automatically initialize any uninitialized stack variables.
|
||||
// Prefer zero-init if both options are set.
|
||||
// Prefer zero-init if multiple options are set.
|
||||
if ctx.Config().IsEnvTrue("AUTO_ZERO_INITIALIZE") {
|
||||
flags = append(flags, "-ftrivial-auto-var-init=zero -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang")
|
||||
} else if ctx.Config().IsEnvTrue("AUTO_PATTERN_INITIALIZE") {
|
||||
|
@ -170,8 +170,8 @@ func init() {
|
|||
} else if ctx.Config().IsEnvTrue("AUTO_UNINITIALIZE") {
|
||||
flags = append(flags, "-ftrivial-auto-var-init=uninitialized")
|
||||
} else {
|
||||
// Default to pattern initialization.
|
||||
flags = append(flags, "-ftrivial-auto-var-init=pattern")
|
||||
// Default to zero initialization.
|
||||
flags = append(flags, "-ftrivial-auto-var-init=zero -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang")
|
||||
}
|
||||
|
||||
return strings.Join(flags, " ")
|
||||
|
|
Loading…
Reference in a new issue