port symlinked-rlib to rmake
This commit is contained in:
parent
80408e0649
commit
59acd23457
@ -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
|
||||
|
@ -1,12 +0,0 @@
|
||||
# ignore-cross-compile
|
||||
include ../tools.mk
|
||||
|
||||
# ignore-windows
|
||||
# `ln` is actually `cp` on msys.
|
||||
|
||||
all:
|
||||
$(RUSTC) foo.rs
|
||||
mkdir -p $(TMPDIR)/other
|
||||
ln -nsf $(TMPDIR)/libfoo.rlib $(TMPDIR)/other
|
||||
$(RUSTC) bar.rs -L $(TMPDIR)
|
||||
$(RUSTC) baz.rs --extern foo=$(TMPDIR)/other/libfoo.rlib -L $(TMPDIR)
|
@ -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.
|
||||
|
@ -1,10 +0,0 @@
|
||||
# ignore-cross-compile
|
||||
include ../tools.mk
|
||||
|
||||
# ignore-windows
|
||||
# `ln` is actually `cp` on msys.
|
||||
|
||||
all:
|
||||
$(RUSTC) foo.rs --crate-type=rlib -o $(TMPDIR)/foo.xxx
|
||||
ln -nsf $(TMPDIR)/foo.xxx $(TMPDIR)/libfoo.rlib
|
||||
$(RUSTC) bar.rs -L $(TMPDIR)
|
16
tests/run-make/symlinked-rlib/rmake.rs
Normal file
16
tests/run-make/symlinked-rlib/rmake.rs
Normal file
@ -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());
|
||||
}
|
Loading…
Reference in New Issue
Block a user