Skip to content

Commit 59acd23

Browse files
committed
port symlinked-rlib to rmake
1 parent 80408e0 commit 59acd23

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,6 @@ run-make/symbol-mangling-hashed/Makefile
229229
run-make/symbol-visibility/Makefile
230230
run-make/symbols-include-type-name/Makefile
231231
run-make/symlinked-libraries/Makefile
232-
run-make/symlinked-rlib/Makefile
233232
run-make/sysroot-crates-are-unstable/Makefile
234233
run-make/target-cpu-native/Makefile
235234
run-make/target-specs/Makefile

tests/run-make/symlinked-extern/Makefile

Lines changed: 0 additions & 12 deletions
This file was deleted.

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

Lines changed: 1 addition & 0 deletions
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

Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 16 additions & 0 deletions
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)