init_first_stage: Disable ThinLTO

Static executables + x86 target build + ThinLTO produces bug behavior.
Global variables are not constructor initialized, resulting in faulty
runtime behavior.

Bug: 169004486
Bug: 291033685
Test: Treehugger
Change-Id: I777016cceb4851f2b432a37bc4d29aed56c23804
This commit is contained in:
Yi-Yo Chiang 2023-07-20 18:41:15 +08:00
parent 6044e8e444
commit 4d6fa8ccaf

View file

@ -394,6 +394,10 @@ init_first_stage_cc_defaults {
],
static_executable: true,
lto: {
// b/169004486 ThinLTO breaks x86 static executables.
never: true,
},
system_shared_libs: [],
cflags: [