rewrite rustc-macro-dep-files to rmake
This commit is contained in:
parent
f768db6ba6
commit
87c7a42ba9
@ -116,7 +116,6 @@ run-make/return-non-c-like-enum-from-c/Makefile
|
||||
run-make/rlib-format-packed-bundled-libs-2/Makefile
|
||||
run-make/rlib-format-packed-bundled-libs-3/Makefile
|
||||
run-make/rlib-format-packed-bundled-libs/Makefile
|
||||
run-make/rustc-macro-dep-files/Makefile
|
||||
run-make/sanitizer-cdylib-link/Makefile
|
||||
run-make/sanitizer-dylib-link/Makefile
|
||||
run-make/sanitizer-staticlib-link/Makefile
|
||||
|
@ -1,11 +0,0 @@
|
||||
include ../tools.mk
|
||||
|
||||
# FIXME(eddyb) provide `HOST_RUSTC` and `TARGET_RUSTC`
|
||||
# instead of hardcoding them everywhere they're needed.
|
||||
ifeq ($(IS_MUSL_HOST),1)
|
||||
ADDITIONAL_ARGS := $(RUSTFLAGS)
|
||||
endif
|
||||
all:
|
||||
$(BARE_RUSTC) $(ADDITIONAL_ARGS) foo.rs --out-dir $(TMPDIR)
|
||||
$(RUSTC) bar.rs --target $(TARGET) --emit dep-info
|
||||
$(CGREP) -v "proc-macro source" < $(TMPDIR)/bar.d
|
13
tests/run-make/rustc-macro-dep-files/rmake.rs
Normal file
13
tests/run-make/rustc-macro-dep-files/rmake.rs
Normal file
@ -0,0 +1,13 @@
|
||||
// --emit dep-info used to print all macro-generated code it could
|
||||
// find as if it was part of a nonexistent file named "proc-macro source",
|
||||
// which is not a valid path. After this was fixed in #36776, this test checks
|
||||
// that macro code is not falsely seen as coming from a different file in dep-info.
|
||||
// See https://github.com/rust-lang/rust/issues/36625
|
||||
|
||||
use run_make_support::{fs_wrapper, rustc, target};
|
||||
|
||||
fn main() {
|
||||
rustc().input("foo.rs").run();
|
||||
rustc().input("bar.rs").target(target()).emit("dep-info").run();
|
||||
assert!(!fs_wrapper::read_to_string("bar.d").contains("proc-macro source"));
|
||||
}
|
Loading…
Reference in New Issue
Block a user