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
diff --git a/init/Android.bp b/init/Android.bp
index 1af398a..0b8c7dc 100644
--- a/init/Android.bp
+++ b/init/Android.bp
@@ -394,6 +394,10 @@
],
static_executable: true,
+ lto: {
+ // b/169004486 ThinLTO breaks x86 static executables.
+ never: true,
+ },
system_shared_libs: [],
cflags: [