1 # needs-profiler-support
4 -include ../../run-make-fulldeps/tools.mk
6 # FIXME(eddyb) provide `HOST_RUSTC` and `TARGET_RUSTC`
7 # instead of hardcoding them everywhere they're needed.
8 ifeq ($(IS_MUSL_HOST),1)
9 ADDITIONAL_ARGS := $(RUSTFLAGS)
13 # Generate PGO profiles
14 $(BARE_RUSTC) $(ADDITIONAL_ARGS) -Cprofile-generate=$(TMPDIR)/profiles --out-dir $(TMPDIR) main.rs
18 "$(LLVM_BIN_DIR)/llvm-profdata" merge \
19 -o "$(TMPDIR)/merged.profdata" \
20 "$(TMPDIR)/profiles" || exit 1
23 $(RUSTC) -Cprofile-use=$(TMPDIR)/merged.profdata --emit dep-info main.rs
25 # Check that profile file is in depinfo
26 $(CGREP) "merged.profdata" < $(TMPDIR)/main.d