Don’t ICE if fs::canonicalise fails in meta-load
This might fail when --extern library is a symlink to an invalid location. Instead just pretend it doesn’t exist at all.
This commit is contained in:
parent
c78c0994b1
commit
ab86face01
4 changed files with 49 additions and 7 deletions
16
src/test/run-make/issue-26006/Makefile
Normal file
16
src/test/run-make/issue-26006/Makefile
Normal file
|
|
@ -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
|
||||
12
src/test/run-make/issue-26006/in/libc/lib.rs
Normal file
12
src/test/run-make/issue-26006/in/libc/lib.rs
Normal file
|
|
@ -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(){}
|
||||
13
src/test/run-make/issue-26006/in/time/lib.rs
Normal file
13
src/test/run-make/issue-26006/in/time/lib.rs
Normal file
|
|
@ -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(){}
|
||||
Loading…
Add table
Add a link
Reference in a new issue