LTO_THIN_DIST + AutoFDO + Propeller support
Makefile.autofdo
> ifdef CONFIG_LTO_CLANG_THIN
_ldflags_autofdo := --mllvm=-enable-fs-discriminator=true --mllvm=-improved-fs-discriminator=true -plugin-opt=thinlto
_ldflags_autofdo += -plugin-opt=-split-machine-functions
ifdef CLANG_AUTOFDO_PROFILE
_ldflags_autofdo += --lto-sample-profile=$(CLANG_AUTOFDO_PROFILE)
endif
LDFLAGS_vmlinux += $(_ldflags_autofdo)
endif
Makefile.propeller
> ifdef CONFIG_LTO_CLANG_THIN
ifdef CLANG_PROPELLER_PROFILE_PREFIX
_ldflags_propeller += --lto-basic-block-sections=$(CLANG_PROPELLER_PROFILE_PREFIX)_cc_profile.txt
else
ifeq ($(call test-ge, $(CONFIG_LLD_VERSION), 200000),y)
_ldflags_propeller += --lto-basic-block-address-map
else
_ldflags_propeller += --lto-basic-block-sections=labels
endif
LDFLAGS_vmlinux := $(filter-out -plugin-opt=-split-machine-functions, $(LDFLAGS_vmlinux))
endif
endif
Correct me if I'm wrong, which I really hope for, but lto-thin-dist isn't supported with autofdo + propeller, right?
关闭于 2026-01-04 1 条评论