1 # needs-profiler-support
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.
9 COMPILE_FLAGS=-Copt-level=3 -Clto=fat -Cprofile-generate="$(TMPDIR)"
11 # LLVM doesn't yet support instrumenting binaries that use unwinding on MSVC:
12 # https://github.com/rust-lang/rust/issues/61002
14 # Things work fine with -Cpanic=abort though.
16 COMPILE_FLAGS+= -Cpanic=abort
20 $(RUSTC) $(COMPILE_FLAGS) test.rs
21 $(call RUN,test) || exit 1
22 [ -e "$(TMPDIR)"/default_*.profraw ] || (echo "No .profraw file"; exit 1)