diff --git a/src/tools/tidy/src/allowed_run_make_makefiles.txt b/src/tools/tidy/src/allowed_run_make_makefiles.txt index 600ca06fcdf3a..b6c9a1b6e4b13 100644 --- a/src/tools/tidy/src/allowed_run_make_makefiles.txt +++ b/src/tools/tidy/src/allowed_run_make_makefiles.txt @@ -238,7 +238,6 @@ run-make/symbol-visibility/Makefile run-make/symbols-include-type-name/Makefile run-make/symlinked-extern/Makefile run-make/symlinked-libraries/Makefile -run-make/symlinked-rlib/Makefile run-make/sysroot-crates-are-unstable/Makefile run-make/target-cpu-native/Makefile run-make/target-specs/Makefile diff --git a/tests/run-make/symlinked-rlib/Makefile b/tests/run-make/symlinked-rlib/Makefile deleted file mode 100644 index a8565f683c3e8..0000000000000 --- a/tests/run-make/symlinked-rlib/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -# ignore-cross-compile -include ../tools.mk - -# ignore-windows -# `ln` is actually `cp` on msys. - -all: - $(RUSTC) foo.rs --crate-type=rlib -o $(TMPDIR)/foo.xxx - ln -nsf $(TMPDIR)/foo.xxx $(TMPDIR)/libfoo.rlib - $(RUSTC) bar.rs -L $(TMPDIR) diff --git a/tests/run-make/symlinked-rlib/rmake.rs b/tests/run-make/symlinked-rlib/rmake.rs new file mode 100644 index 0000000000000..670a50a440790 --- /dev/null +++ b/tests/run-make/symlinked-rlib/rmake.rs @@ -0,0 +1,20 @@ +//@ ignore-cross-compile +// `ln` is actually `cp` on msys. +//@ ignore-windows + +use run_make_support::{rustc, tmp_dir}; +use std::process::Command; + +fn main() { + let out = tmp_dir().join("foo.xxx"); + + rustc().input("foo.rs").crate_type("rlib").output(&out).run(); + let output = Command::new("ln") + .arg("-nsf") + .arg(out) + .arg(tmp_dir().join("libfoo.rlib")) + .output() + .unwrap(); + assert!(output.status.success()); + rustc().input("bar.rs").library_search_path(tmp_dir()).run(); +}