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

Commit 9a8a0e6f authored by Sami Tolvanen's avatar Sami Tolvanen
Browse files

ANDROID: kernel/Makefile: do not disable LTO for sys_ni.c with CFI



sys_ni.c compiles fine with CONFIG_LTO_CLANG, and disabling LTO
for it breaks indirect call checking to functions in this file.

Bug: 138254717
Change-Id: I7947cf3d0283ad37431860739665fee7fb0dfbdb
Signed-off-by: default avatarSami Tolvanen <samitolvanen@google.com>
parent b9079579
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -32,8 +32,10 @@ KCOV_INSTRUMENT_kcov.o := n
KASAN_SANITIZE_kcov.o := n
CFLAGS_kcov.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector)

# cond_syscall is currently not LTO compatible
ifndef CONFIG_CFI_CLANG
# cond_syscall is currently not gcc LTO compatible
CFLAGS_sys_ni.o = $(DISABLE_LTO)
endif

# Don't instrument error handlers
CFLAGS_cfi.o = $(DISABLE_CFI_CLANG)