Skip to content

Commit 5f1e861

Browse files
committed
rewrite libs-through-symlinks to rmake
1 parent e08b80c commit 5f1e861

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
@@ -8,7 +8,6 @@ run-make/extern-fn-reachable/Makefile
88
run-make/incr-add-rust-src-component/Makefile
99
run-make/issue-84395-lto-embed-bitcode/Makefile
1010
run-make/jobserver-error/Makefile
11-
run-make/libs-through-symlinks/Makefile
1211
run-make/libtest-json/Makefile
1312
run-make/libtest-junit/Makefile
1413
run-make/libtest-thread-limit/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)