Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e0b05e69 authored by Sami Tolvanen's avatar Sami Tolvanen
Browse files

ANDROID: kbuild: change LTO into a choice



This fixes allmodconfig and prepares for gcc's LTO support.

Bug: 67506682
Change-Id: Ied90f9f25293321287b25fd6f214f7f1913f44cb
Signed-off-by: default avatarSami Tolvanen <samitolvanen@google.com>
parent da3bc265
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -490,7 +490,7 @@ config LD_DEAD_CODE_DATA_ELIMINATION
	  is used to distinguish them from label names / C identifiers.

config LTO
	bool
	def_bool n

config ARCH_SUPPORTS_LTO_CLANG
	bool
@@ -500,6 +500,15 @@ config ARCH_SUPPORTS_LTO_CLANG
	  - compiling inline assembly with clang's integrated assembler,
	  - and linking with either lld or GNU gold w/ LLVMgold.

choice
	prompt "Link-Time Optimization (LTO) (EXPERIMENTAL)"
	default LTO_NONE
	help
	  This option turns on Link-Time Optimization (LTO).

config LTO_NONE
	bool "None"

config LTO_CLANG
	bool "Use clang Link Time Optimization (LTO) (EXPERIMENTAL)"
	depends on ARCH_SUPPORTS_LTO_CLANG
@@ -518,6 +527,8 @@ config LTO_CLANG
          5.0 (make CC=clang) and GNU gold from binutils >= 2.27, and have the
          LLVMgold plug-in in LD_LIBRARY_PATH.

endchoice

config CFI
	bool