Added a test
This commit is contained in:
parent
7edc16c7be
commit
cc3b6f24b7
14
src/test/run-make/symlinked-rlib/Makefile
Normal file
14
src/test/run-make/symlinked-rlib/Makefile
Normal file
@ -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
|
15
src/test/run-make/symlinked-rlib/bar.rs
Normal file
15
src/test/run-make/symlinked-rlib/bar.rs
Normal file
@ -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 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
extern crate foo;
|
||||
|
||||
fn main() {
|
||||
foo::bar();
|
||||
}
|
11
src/test/run-make/symlinked-rlib/foo.rs
Normal file
11
src/test/run-make/symlinked-rlib/foo.rs
Normal file
@ -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 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
pub fn bar() {}
|
Loading…
Reference in New Issue
Block a user