File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -659,6 +659,13 @@ fn add_plugin_deps(
659
659
Ok ( ( ) )
660
660
}
661
661
662
+ fn get_dynamic_search_path ( path : & Path ) -> & Path {
663
+ match path. to_str ( ) . and_then ( |s| s. split_once ( "=" ) ) {
664
+ Some ( ( "native" | "crate" | "dependency" | "framework" | "all" , path) ) => Path :: new ( path) ,
665
+ _ => path,
666
+ }
667
+ }
668
+
662
669
// Determine paths to add to the dynamic search path from -L entries
663
670
//
664
671
// Strip off prefixes like "native=" or "framework=" and filter out directories
@@ -670,12 +677,9 @@ where
670
677
{
671
678
let mut search_path = vec ! [ ] ;
672
679
for dir in paths {
673
- let dir = match dir. to_str ( ) . and_then ( |s| s. split_once ( "=" ) ) {
674
- Some ( ( "native" | "crate" | "dependency" | "framework" | "all" , path) ) => path. into ( ) ,
675
- _ => dir. clone ( ) ,
676
- } ;
680
+ let dir = get_dynamic_search_path ( dir) ;
677
681
if dir. starts_with ( & root_output) {
678
- search_path. push ( dir) ;
682
+ search_path. push ( dir. to_path_buf ( ) ) ;
679
683
} else {
680
684
debug ! (
681
685
"Not including path {} in runtime library search path because it is \
You can’t perform that action at this time.
0 commit comments