diff --git a/src/test/run-make/symlinked-rlib/Makefile b/src/test/run-make/symlinked-rlib/Makefile new file mode 100644 index 00000000000..2709f786e0a --- /dev/null +++ b/src/test/run-make/symlinked-rlib/Makefile @@ -0,0 +1,14 @@ +-include ../tools.mk + +# ignore windows: `ln` is actually `cp` on msys. +ifndef IS_WINDOWS + +all: + $(RUSTC) foo.rs --crate-type=rlib -o $(TMPDIR)/foo.xxx + ln -nsf $(TMPDIR)/foo.xxx $(TMPDIR)/libfoo.rlib + $(RUSTC) bar.rs -L $(TMPDIR) + +else +all: + +endif diff --git a/src/test/run-make/symlinked-rlib/bar.rs b/src/test/run-make/symlinked-rlib/bar.rs new file mode 100644 index 00000000000..e8f06680862 --- /dev/null +++ b/src/test/run-make/symlinked-rlib/bar.rs @@ -0,0 +1,15 @@ +// Copyright 2016 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +extern crate foo; + +fn main() { + foo::bar(); +} diff --git a/src/test/run-make/symlinked-rlib/foo.rs b/src/test/run-make/symlinked-rlib/foo.rs new file mode 100644 index 00000000000..5abbb1dcbce --- /dev/null +++ b/src/test/run-make/symlinked-rlib/foo.rs @@ -0,0 +1,11 @@ +// Copyright 2016 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +pub fn bar() {}