Hi all,
It takes 15mins+ to link vmlinux.o with 'CONFIG_LTO_CLANG_FULL=y' ('-flto'),
while only takes less than 2mins to link vmlinux.o with 'CONFIG_LTO_CLANG_THIN=y' ('-flto=thin)'.
I compared the code size of ThinLTO and FullLTO(tested with Android ACK kernel).
vmlinux.o with FullLTO ~= 1.2GB
vmlinux.o with ThinLTO ~=1.1GB
Summarize the above, ThinLTO has smaller code size, matching performance with FullLTO.
Why doesn't ACK kernel use '-flto=thin'?