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

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

ANDROID: arm64: kbuild: only specify code model with LTO for modules



This fixes CONFIG_LTO_CLANG for LLVM >= r334571 where LLVMgold actually
started respecting the code model flag.

Bug: 116819139
Test: builds with LLVM r334571, boots on a device, all modules load
Change-Id: I1af9d24ed1b789a40ac1e85bd00e176ff8a68aa5
Signed-off-by: default avatarSami Tolvanen <samitolvanen@google.com>
parent c4e7788b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -104,7 +104,7 @@ ifeq ($(CONFIG_ARM64_MODULE_CMODEL_LARGE), y)
KBUILD_CFLAGS_MODULE	+= -mcmodel=large
ifeq ($(CONFIG_LTO_CLANG), y)
# Code model is not stored in LLVM IR, so we need to pass it also to LLVMgold
LDFLAGS		+= -plugin-opt=-code-model=large
KBUILD_LDFLAGS_MODULE	+= -plugin-opt=-code-model=large
endif
endif