]> git.lizzy.rs Git - rust.git/blob - src/test/run-make-fulldeps/pgo-gen-no-imp-symbols/Makefile
Rollup merge of #87288 - ijackson:rustdoc-theme, r=GuillaumeGomez
[rust.git] / src / test / run-make-fulldeps / pgo-gen-no-imp-symbols / Makefile
1 # needs-profiler-support
2
3 -include ../tools.mk
4
5 COMPILE_FLAGS=-O -Ccodegen-units=1 -Cprofile-generate="$(TMPDIR)"
6
7 # LLVM doesn't yet support instrumenting binaries that use unwinding on MSVC:
8 # https://github.com/rust-lang/rust/issues/61002
9 #
10 # Things work fine with -Cpanic=abort though.
11 ifdef IS_MSVC
12 COMPILE_FLAGS+= -Cpanic=abort
13 endif
14
15 all:
16         $(RUSTC) $(COMPILE_FLAGS) --emit=llvm-ir test.rs
17         # We expect symbols starting with "__llvm_profile_".
18         $(CGREP) "__llvm_profile_" < $(TMPDIR)/test.ll
19         # We do NOT expect the "__imp_" version of these symbols.
20         $(CGREP) -v "__imp___llvm_profile_" < $(TMPDIR)/test.ll # 64 bit
21         $(CGREP) -v "__imp____llvm_profile_" < $(TMPDIR)/test.ll # 32 bit