ANDROID: arm64: kbuild: only specify code model with LTO for
[GitHub/moto-9609/android_kernel_motorola_exynos9610.git] / arch / arm64 / Makefile
index b5457220641316c0e75df4b4715f94ef05676944..b0f0f607c47998e7fec71bb1f9fbfe3331c7f1af 100644 (file)
@@ -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