Skip to content

Commit 91661a5

Browse files
committed
rewrite libs-through-symlinks to rmake
1 parent 8fbdc04 commit 91661a5

File tree

3 files changed

+14
-13
lines changed

3 files changed

+14
-13
lines changed

src/tools/tidy/src/allowed_run_make_makefiles.txt

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ run-make/extern-fn-reachable/Makefile
55
run-make/incr-add-rust-src-component/Makefile
66
run-make/issue-84395-lto-embed-bitcode/Makefile
77
run-make/jobserver-error/Makefile
8-
run-make/libs-through-symlinks/Makefile
98
run-make/libtest-thread-limit/Makefile
109
run-make/macos-deployment-target/Makefile
1110
run-make/reproducible-build/Makefile

tests/run-make/libs-through-symlinks/Makefile

-12
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// The rust compiler searches by default for libraries in its current directory,
2+
// but used to have difficulty following symlinks leading to required libraries
3+
// if the real ones were located elsewhere. After this was fixed in #13903, this test
4+
// checks that compilation succeeds through use of the symlink.
5+
// See https://github.com/rust-lang/rust/issues/13890
6+
7+
use run_make_support::{cwd, path, rfs, rust_lib_name, rustc};
8+
9+
fn main() {
10+
rfs::create_dir("outdir");
11+
rustc().input("foo.rs").output(path("outdir").join(rust_lib_name("foo"))).run();
12+
rfs::create_symlink(path("outdir").join(rust_lib_name("foo")), rust_lib_name("foo"));
13+
rustc().env("RUSTC_LOG", "rustc_metadata::loader").input("bar.rs").run();
14+
}

0 commit comments

Comments
 (0)