04d81ba153
Since `filename_for_metadata()` and `OutputFilenames::path(OutputType::Metadata)` had different logic for the name of the metadata file, the `.d` file contained a file name different from the actual name used. Share the logic to fix the out-of-sync name. Closes 68839.
14 lines
518 B
Makefile
14 lines
518 B
Makefile
include ../tools.mk
|
|
|
|
ifdef RUSTC_BLESS_TEST
|
|
RUSTC_TEST_OP = cp
|
|
else
|
|
RUSTC_TEST_OP = $(DIFF)
|
|
endif
|
|
|
|
all:
|
|
$(RUSTC) --emit=metadata,dep-info --crate-type lib dash-separated.rs -C extra-filename=_something-extra
|
|
# Strip TMPDIR since it is a machine specific absolute path
|
|
sed "s%.*[/\\]%%" "$(TMPDIR)"/dash-separated_something-extra.d > "$(TMPDIR)"/dash-separated_something-extra.normalized.d
|
|
$(RUSTC_TEST_OP) "$(TMPDIR)"/dash-separated_something-extra.normalized.d dash-separated_something-extra.normalized.d
|