Skip to content

Commit

Permalink
Tweak to Makefile to overcome MacOS make corruption bug
Browse files Browse the repository at this point in the history
  • Loading branch information
richkadel committed Dec 3, 2020
1 parent f101fd8 commit dc4bd90
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions src/test/run-make-fulldeps/coverage-reports/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -87,20 +87,14 @@ endif
%: $(SOURCEDIR)/lib/%.rs
# Compile the test library with coverage instrumentation
$(RUSTC) $(SOURCEDIR)/lib/$@.rs \
$$( grep -q '^\/\/ require-rust-edition-2018' $(SOURCEDIR)/lib/$@.rs && \
echo "--edition=2018" \
) \
--crate-type rlib \
-Zinstrument-coverage
$$( grep -q '^\/\/ require-rust-edition-2018' $(SOURCEDIR)/lib/$@.rs && echo "--edition=2018" ) \
--crate-type rlib -Zinstrument-coverage

%: $(SOURCEDIR)/%.rs
# Compile the test program with coverage instrumentation
$(RUSTC) $(SOURCEDIR)/$@.rs \
$$( grep -q '^\/\/ require-rust-edition-2018' $(SOURCEDIR)/$@.rs && \
echo "--edition=2018" \
) \
-L "$(TMPDIR)" \
-Zinstrument-coverage
$$( grep -q '^\/\/ require-rust-edition-2018' $(SOURCEDIR)/$@.rs && echo "--edition=2018" ) \
-L "$(TMPDIR)" -Zinstrument-coverage

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

0 comments on commit dc4bd90

Please sign in to comment.