mirror of https://github.com/rust-lang/rust.git
rewrite track-path-dep-info to rmake
This commit is contained in:
parent
8daf82fece
commit
48a9d4b68a
|
@ -158,7 +158,6 @@ run-make/target-without-atomic-cas/Makefile
|
||||||
run-make/test-benches/Makefile
|
run-make/test-benches/Makefile
|
||||||
run-make/thumb-none-cortex-m/Makefile
|
run-make/thumb-none-cortex-m/Makefile
|
||||||
run-make/thumb-none-qemu/Makefile
|
run-make/thumb-none-qemu/Makefile
|
||||||
run-make/track-path-dep-info/Makefile
|
|
||||||
run-make/track-pgo-dep-info/Makefile
|
run-make/track-pgo-dep-info/Makefile
|
||||||
run-make/translation/Makefile
|
run-make/translation/Makefile
|
||||||
run-make/type-mismatch-same-crate-name/Makefile
|
run-make/type-mismatch-same-crate-name/Makefile
|
||||||
|
|
|
@ -1,13 +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:
|
|
||||||
# Proc macro
|
|
||||||
$(BARE_RUSTC) $(ADDITIONAL_ARGS) --out-dir $(TMPDIR) macro_def.rs
|
|
||||||
EXISTING_PROC_MACRO_ENV=1 $(RUSTC) --emit dep-info macro_use.rs
|
|
||||||
$(CGREP) "emojis.txt:" < $(TMPDIR)/macro_use.d
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
// This test checks the functionality of `tracked_path::path`, a procedural macro
|
||||||
|
// feature that adds a dependency to another file inside the procmacro. In this case,
|
||||||
|
// the text file is added through this method, and the test checks that the compilation
|
||||||
|
// output successfully added the file as a dependency.
|
||||||
|
// See https://github.com/rust-lang/rust/pull/84029
|
||||||
|
|
||||||
|
//FIXME(Oneirical): Try it on musl
|
||||||
|
|
||||||
|
use run_make_support::{bare_rustc, fs_wrapper, rustc};
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
bare_rustc().input("macro_def.rs").run();
|
||||||
|
rustc().env("EXISTING_PROC_MACRO_ENV", "1").emit("dep-info").input("macro_use.rs").run();
|
||||||
|
assert!(fs_wrapper::read_to_string("macro_use.d").contains("emojis.txt:"));
|
||||||
|
}
|
Loading…
Reference in New Issue