If CONFIG_USE_MOLD is set, all target packages will use the mold linker.
Except the ones which opted-out via setting PKG_BUILD_FLAGS:=no-mold.
Signed-off-by: Andre Heider <a.heider@gmail.com>
TARGET_CXXFLAGS+= -flto=auto -fno-fat-lto-objects
TARGET_LDFLAGS+= -flto=auto -fuse-linker-plugin
endif
+ifdef CONFIG_USE_MOLD
+ ifeq ($(call pkg_build_flag,mold,1),1)
+ TARGET_LINKER:=mold
+ endif
+endif
include $(INCLUDE_DIR)/hardening.mk
include $(INCLUDE_DIR)/prereq.mk