Skip to content

Commit

Permalink
port symlinked-rlib to rmake
Browse files Browse the repository at this point in the history
  • Loading branch information
Oneirical committed Jun 12, 2024
1 parent 80408e0 commit 59acd23
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 23 deletions.
1 change: 0 additions & 1 deletion src/tools/tidy/src/allowed_run_make_makefiles.txt
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,6 @@ run-make/symbol-mangling-hashed/Makefile
run-make/symbol-visibility/Makefile
run-make/symbols-include-type-name/Makefile
run-make/symlinked-libraries/Makefile
run-make/symlinked-rlib/Makefile
run-make/sysroot-crates-are-unstable/Makefile
run-make/target-cpu-native/Makefile
run-make/target-specs/Makefile
Expand Down
12 changes: 0 additions & 12 deletions tests/run-make/symlinked-extern/Makefile

This file was deleted.

1 change: 1 addition & 0 deletions tests/run-make/symlinked-extern/rmake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// using the --extern option to rustc, which could lead to rustc thinking
// that it encountered two different versions of a crate, when it's
// actually the same version found through different paths.
// See https://github.com/rust-lang/rust/pull/16505

// This test checks that --extern and symlinks together
// can result in successful compilation.
Expand Down
10 changes: 0 additions & 10 deletions tests/run-make/symlinked-rlib/Makefile

This file was deleted.

16 changes: 16 additions & 0 deletions tests/run-make/symlinked-rlib/rmake.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Rustc did not recognize libraries which were symlinked
// to files having extension other than .rlib. This was fixed
// in #32828. This test creates a symlink to "foo.xxx", which has
// an unusual file extension, and checks that rustc can successfully
// use it as an rlib library.
// See https://github.com/rust-lang/rust/pull/32828

//@ ignore-cross-compile

use run_make_support::{create_symlink, rustc, tmp_dir};

fn main() {
rustc().input("foo.rs").crate_type("rlib").output(tmp_dir().join("foo.xxx")).run();
create_symlink(tmp_dir().join("foo.xxx"), tmp_dir().join("libfoo.rlib"));
rustc().input("bar.rs").library_search_path(tmp_dir());
}

0 comments on commit 59acd23

Please sign in to comment.