File tree 4 files changed +49
-7
lines changed
test/run-make/issue-26006
4 files changed +49
-7
lines changed Original file line number Diff line number Diff line change @@ -429,13 +429,14 @@ impl<'a> Context<'a> {
429
429
let slot = candidates. entry ( hash_str)
430
430
. or_insert_with ( || ( HashMap :: new ( ) , HashMap :: new ( ) ) ) ;
431
431
let ( ref mut rlibs, ref mut dylibs) = * slot;
432
- if rlib {
433
- rlibs. insert ( fs:: canonicalize ( path) . unwrap ( ) , kind) ;
434
- } else {
435
- dylibs. insert ( fs:: canonicalize ( path) . unwrap ( ) , kind) ;
436
- }
437
-
438
- FileMatches
432
+ fs:: canonicalize ( path) . map ( |p| {
433
+ if rlib {
434
+ rlibs. insert ( p, kind) ;
435
+ } else {
436
+ dylibs. insert ( p, kind) ;
437
+ }
438
+ FileMatches
439
+ } ) . unwrap_or ( FileDoesntMatch )
439
440
} ) ;
440
441
self . rejected_via_kind . extend ( staticlibs. into_iter ( ) ) ;
441
442
Original file line number Diff line number Diff line change
1
+ -include ../tools.mk
2
+
3
+ ifndef IS_WINDOWS
4
+ all : time
5
+
6
+ time : libc
7
+ mkdir -p out/time out/time/deps
8
+ ln -sf out/libc/liblibc.rlib out/time/deps/
9
+ $(RUSTC ) in/time/lib.rs -Ldependency=out/time/deps/
10
+
11
+ libc :
12
+ mkdir -p out/libc
13
+ $(RUSTC ) in/libc/lib.rs --crate-name=libc -o out/libc/liblibc.rlib
14
+ else
15
+ all :
16
+ endif
Original file line number Diff line number Diff line change
1
+ // Copyright 2015 The Rust Project Developers. See the COPYRIGHT
2
+ // file at the top-level directory of this distribution and at
3
+ // http://rust-lang.org/COPYRIGHT.
4
+ //
5
+ // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6
+ // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7
+ // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8
+ // option. This file may not be copied, modified, or distributed
9
+ // except according to those terms.
10
+ #![ crate_type="rlib" ]
11
+
12
+ pub fn something ( ) { }
Original file line number Diff line number Diff line change
1
+ // Copyright 2015 The Rust Project Developers. See the COPYRIGHT
2
+ // file at the top-level directory of this distribution and at
3
+ // http://rust-lang.org/COPYRIGHT.
4
+ //
5
+ // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6
+ // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7
+ // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8
+ // option. This file may not be copied, modified, or distributed
9
+ // except according to those terms.
10
+ #![ feature( libc) ]
11
+ extern crate libc;
12
+
13
+ fn main ( ) { }
You can’t perform that action at this time.
0 commit comments