about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-06-08 17:44:30 +0000
committerbors <bors@rust-lang.org>2015-06-08 17:44:30 +0000
commit4e14ef0516b09bd33020a962aa47cf714def5aff (patch)
treedd98a7bb8b4596e2f8f68e776695cf4be2d1a370 /src/test
parent4a397dd33dad52ca0e66bd5cdfc3b6d049a9ce12 (diff)
parentab86face01786a67da3f6d15db0c3295d75dcdd6 (diff)
downloadrust-4e14ef0516b09bd33020a962aa47cf714def5aff.tar.gz
rust-4e14ef0516b09bd33020a962aa47cf714def5aff.zip
Auto merge of #26044 - nagisa:canonicalize-metadata-loader, r=alexcrichton
This might fail when --extern library is a symlink to an invalid location. Instead just pretend it
doesn’t exist at all.

Fixes #26006
Diffstat (limited to 'src/test')
-rw-r--r--src/test/run-make/issue-26006/Makefile16
-rw-r--r--src/test/run-make/issue-26006/in/libc/lib.rs12
-rw-r--r--src/test/run-make/issue-26006/in/time/lib.rs13
3 files changed, 41 insertions, 0 deletions
diff --git a/src/test/run-make/issue-26006/Makefile b/src/test/run-make/issue-26006/Makefile
new file mode 100644
index 00000000000..10c789d20c0
--- /dev/null
+++ b/src/test/run-make/issue-26006/Makefile
@@ -0,0 +1,16 @@
+-include ../tools.mk
+
+ifndef IS_WINDOWS
+all: time
+
+time: libc
+	mkdir -p out/time out/time/deps
+	ln -sf out/libc/liblibc.rlib out/time/deps/
+	$(RUSTC) in/time/lib.rs -Ldependency=out/time/deps/
+
+libc:
+	mkdir -p out/libc
+	$(RUSTC) in/libc/lib.rs --crate-name=libc -o out/libc/liblibc.rlib
+else
+all:
+endif
diff --git a/src/test/run-make/issue-26006/in/libc/lib.rs b/src/test/run-make/issue-26006/in/libc/lib.rs
new file mode 100644
index 00000000000..177ffdce062
--- /dev/null
+++ b/src/test/run-make/issue-26006/in/libc/lib.rs
@@ -0,0 +1,12 @@
+// Copyright 2015 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.
+#![crate_type="rlib"]
+
+pub fn something(){}
diff --git a/src/test/run-make/issue-26006/in/time/lib.rs b/src/test/run-make/issue-26006/in/time/lib.rs
new file mode 100644
index 00000000000..b1d07d57337
--- /dev/null
+++ b/src/test/run-make/issue-26006/in/time/lib.rs
@@ -0,0 +1,13 @@
+// Copyright 2015 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.
+#![feature(libc)]
+extern crate libc;
+
+fn main(){}