]> git.lizzy.rs Git - rust.git/blob - src/test/run-make-fulldeps/pgo-gen-lto/Makefile
Merge commit '9a0c32934ebe376128230aa8da3275697b2053e7' into sync_cg_clif-2021-03-05
[rust.git] / src / test / run-make-fulldeps / pgo-gen-lto / Makefile
1 # needs-profiler-support
2 # ignore-windows-gnu
3
4 # FIXME(mati865): MinGW GCC miscompiles compiler-rt profiling library but with Clang it works
5 # properly. Since we only have GCC on the CI ignore the test for now.
6
7 -include ../tools.mk
8
9 COMPILE_FLAGS=-Copt-level=3 -Clto=fat -Cprofile-generate="$(TMPDIR)"
10
11 # LLVM doesn't yet support instrumenting binaries that use unwinding on MSVC:
12 # https://github.com/rust-lang/rust/issues/61002
13 #
14 # Things work fine with -Cpanic=abort though.
15 ifdef IS_MSVC
16 COMPILE_FLAGS+= -Cpanic=abort
17 endif
18
19 all:
20         $(RUSTC) $(COMPILE_FLAGS) test.rs
21         $(call RUN,test) || exit 1
22         [ -e "$(TMPDIR)"/default_*.profraw ] || (echo "No .profraw file"; exit 1)