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: Sami Tolvanen <samitolvanen@google.com>
This commit is contained in:
Sami Tolvanen
2018-03-02 10:46:06 -08:00
parent da3bc26599
commit e0b05e693a

View File

@@ -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