diff --git a/contrib/pgo-lto/Makefile b/contrib/pgo-lto/Makefile index e59cc5235791a..fb4de16b009f8 100644 --- a/contrib/pgo-lto/Makefile +++ b/contrib/pgo-lto/Makefile @@ -42,7 +42,7 @@ stage1: | $(STAGE1_BUILD) stage2: export CFLAGS=-fprofile-use=$(PROFILE_FILE) stage2: export CXXFLAGS=-fprofile-use=$(PROFILE_FILE) -stage2: export LDFLAGS=-fuse-ld=lld -flto=thin -fprofile-use=$(PROFILE_FILE) +stage2: export LDFLAGS=-fuse-ld=lld -flto=thin -fprofile-use=$(PROFILE_FILE) -Wl,--icf=safe stage2: $(PROFILE_FILE) | $(STAGE2_BUILD) $(MAKE) -C $(STAGE2_BUILD) && touch $@