Skip to content

Commit 3147666

Browse files
committed
port symlinked-libraries to rmake
1 parent 5b4b92a commit 3147666

File tree

3 files changed

+17
-12
lines changed

3 files changed

+17
-12
lines changed

src/tools/tidy/src/allowed_run_make_makefiles.txt

-1
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,6 @@ run-make/suspicious-library/Makefile
252252
run-make/symbol-mangling-hashed/Makefile
253253
run-make/symbol-visibility/Makefile
254254
run-make/symbols-include-type-name/Makefile
255-
run-make/symlinked-libraries/Makefile
256255
run-make/sysroot-crates-are-unstable/Makefile
257256
run-make/target-cpu-native/Makefile
258257
run-make/target-specs/Makefile

tests/run-make/symlinked-libraries/Makefile

-11
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// When a directory and a symlink simultaneously exist with the same name,
2+
// setting that name as the library search path should not cause rustc
3+
// to avoid looking in the symlink and cause an error. This test creates
4+
// a directory and a symlink named "other", and places the library in the symlink.
5+
// If it succeeds, the library was successfully found.
6+
// See https://github.com/rust-lang/rust/issues/12459
7+
8+
//@ ignore-cross-compile
9+
use run_make_support::{create_symlink, dynamic_lib, rustc, tmp_dir};
10+
use std::fs;
11+
12+
fn main() {
13+
rustc().input("foo.rs").arg("-Cprefer-dynamic").run();
14+
fs::create_dir_all(tmp_dir().join("other")).unwrap();
15+
create_symlink(dynamic_lib("foo"), tmp_dir().join("other"));
16+
rustc().input("bar.rs").library_search_path(tmp_dir().join("other")).run();
17+
}

0 commit comments

Comments
 (0)