fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1# needs-profiler-support 2# ignore-windows-gnu 3# ignore-cross-compile 4 5# FIXME(mati865): MinGW GCC miscompiles compiler-rt profiling library but with Clang it works 6# properly. Since we only have GCC on the CI ignore the test for now. 7 8include ../tools.mk 9 10PROFILE_DIR=$(TMPDIR)/profiles 11 12check_hotness: 13 $(RUSTC) -Cprofile-generate="$(TMPDIR)"/profdata -O foo.rs -o$(TMPDIR)/foo 14 $(TMPDIR)/foo 15 "$(LLVM_BIN_DIR)"/llvm-profdata merge \ 16 -o "$(TMPDIR)"/merged.profdata \ 17 "$(TMPDIR)"/profdata/*.profraw 18 $(RUSTC) -Cprofile-use=$(TMPDIR)/merged.profdata -O foo.rs -Cremark=all -Zremark-dir=$(PROFILE_DIR) 19 20 # Check that PGO hotness is included in the remark files 21 cat $(PROFILE_DIR)/*.opt.yaml | $(CGREP) -e "Hotness"