Skip to content

Commit 5b4b92a

Browse files
committed
port symlinked-rlib to rmake
1 parent 27aea78 commit 5b4b92a

File tree

5 files changed

+17
-23
lines changed

5 files changed

+17
-23
lines changed

src/tools/tidy/src/allowed_run_make_makefiles.txt

-1
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,6 @@ run-make/symbol-mangling-hashed/Makefile
253253
run-make/symbol-visibility/Makefile
254254
run-make/symbols-include-type-name/Makefile
255255
run-make/symlinked-libraries/Makefile
256-
run-make/symlinked-rlib/Makefile
257256
run-make/sysroot-crates-are-unstable/Makefile
258257
run-make/target-cpu-native/Makefile
259258
run-make/target-specs/Makefile

tests/run-make/symlinked-extern/Makefile

-12
This file was deleted.

tests/run-make/symlinked-extern/rmake.rs

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// using the --extern option to rustc, which could lead to rustc thinking
44
// that it encountered two different versions of a crate, when it's
55
// actually the same version found through different paths.
6+
// See https://github.com/rust-lang/rust/pull/16505
67

78
// This test checks that --extern and symlinks together
89
// can result in successful compilation.

tests/run-make/symlinked-rlib/Makefile

-10
This file was deleted.
+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// Rustc did not recognize libraries which were symlinked
2+
// to files having extension other than .rlib. This was fixed
3+
// in #32828. This test creates a symlink to "foo.xxx", which has
4+
// an unusual file extension, and checks that rustc can successfully
5+
// use it as an rlib library.
6+
// See https://github.com/rust-lang/rust/pull/32828
7+
8+
//@ ignore-cross-compile
9+
10+
use run_make_support::{create_symlink, rustc, tmp_dir};
11+
12+
fn main() {
13+
rustc().input("foo.rs").crate_type("rlib").output(tmp_dir().join("foo.xxx")).run();
14+
create_symlink(tmp_dir().join("foo.xxx"), tmp_dir().join("libfoo.rlib"));
15+
rustc().input("bar.rs").library_search_path(tmp_dir());
16+
}

0 commit comments

Comments
 (0)