From 4d6fa8ccaf37f5ba5b501036cd187a184f119438 Mon Sep 17 00:00:00 2001 From: Yi-Yo Chiang Date: Thu, 20 Jul 2023 18:41:15 +0800 Subject: [PATCH] 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 --- init/Android.bp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/init/Android.bp b/init/Android.bp index 1af398a9a..0b8c7dc09 100644 --- a/init/Android.bp +++ b/init/Android.bp @@ -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: [