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

Commit 2a09336c authored by Aayush Gupta's avatar Aayush Gupta
Browse files

Merge remote-tracking branch 'origin/lineage-18.1' into v1-r

parents 740de401 961af007
Loading
Loading
Loading
Loading
+27 −0
Original line number Diff line number Diff line
@@ -55,6 +55,8 @@
#                                                      aarch64-linux-gnu- for arm64
#                                                      x86_64-linux-gnu- for x86
#
#   KERNEL_LTO                         = Optional, force LTO to none / thin / full
#
#   NEED_KERNEL_MODULE_ROOT            = Optional, if true, install kernel
#                                          modules in root instead of vendor
#   NEED_KERNEL_MODULE_SYSTEM          = Optional, if true, install kernel
@@ -275,6 +277,31 @@ endef
# $(2): The defconfig to process (just the filename, no need for full path to file)
define make-kernel-config
	$(call internal-make-kernel-target,$(1),VARIANT_DEFCONFIG=$(VARIANT_DEFCONFIG) SELINUX_DEFCONFIG=$(SELINUX_DEFCONFIG) $(2))
	$(hide) if [ "$(KERNEL_LTO)" = "none" ]; then \
			$(KERNEL_SRC)/scripts/config --file $(1)/.config \
			-d LTO_CLANG \
			-e LTO_NONE \
			-d LTO_CLANG_THIN \
			-d LTO_CLANG_FULL \
			-d THINLTO; \
			$(call make-kernel-target,olddefconfig); \
		elif [ "$(KERNEL_LTO)" = "thin" ]; then \
			$(KERNEL_SRC)/scripts/config --file $(1)/.config \
			-e LTO_CLANG \
			-d LTO_NONE \
			-e LTO_CLANG_THIN \
			-d LTO_CLANG_FULL \
			-e THINLTO; \
			$(call make-kernel-target,olddefconfig); \
		elif [ "$(KERNEL_LTO)" = "full" ]; then \
			$(KERNEL_SRC)/scripts/config --file $(1)/.config \
			-e LTO_CLANG \
			-d LTO_NONE \
			-d LTO_CLANG_THIN \
			-e LTO_CLANG_FULL \
			-d THINLTO; \
			$(call make-kernel-target,olddefconfig); \
		fi
	$(hide) if [ ! -z "$(KERNEL_CONFIG_OVERRIDE)" ]; then \
			echo "Overriding kernel config with '$(KERNEL_CONFIG_OVERRIDE)'"; \
			echo $(KERNEL_CONFIG_OVERRIDE) >> $(1)/.config; \