Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Partially fix src/test/run-make/coverage-reports when cross-compiling #103178

Merged
merged 1 commit into from
Oct 19, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/test/run-make/coverage-reports/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# needs-profiler-support
# ignore-windows-gnu

# FIXME(pietroalbini): this test currently does not work on cross-compiled
# targets because remote-test is not capable of sending back the *.profraw
# files generated by the LLVM instrumentation.
# ignore-cross-compile

# Rust coverage maps support LLVM Coverage Mapping Format versions 5 and 6,
# corresponding with LLVM versions 12 and 13, respectively.
# When upgrading LLVM versions, consider whether to enforce a minimum LLVM
Expand Down Expand Up @@ -81,13 +86,13 @@ include clear_expected_if_blessed
# Compile the test library with coverage instrumentation
$(RUSTC) $(SOURCEDIR)/lib/[email protected] \
$$( sed -n 's/^\/\/ compile-flags: \([^#]*\).*/\1/p' $(SOURCEDIR)/lib/[email protected] ) \
--crate-type rlib -Cinstrument-coverage
--crate-type rlib -Cinstrument-coverage --target $(TARGET)

%: $(SOURCEDIR)/%.rs
# Compile the test program with coverage instrumentation
$(RUSTC) $(SOURCEDIR)/[email protected] \
$$( sed -n 's/^\/\/ compile-flags: \([^#]*\).*/\1/p' $(SOURCEDIR)/[email protected] ) \
-L "$(TMPDIR)" -Cinstrument-coverage
-L "$(TMPDIR)" -Cinstrument-coverage --target $(TARGET)

# Run it in order to generate some profiling data,
# with `LLVM_PROFILE_FILE=<profdata_file>` environment variable set to
Expand Down