File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -659,6 +659,13 @@ fn add_plugin_deps(
659659 Ok ( ( ) )
660660}
661661
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+
662669// Determine paths to add to the dynamic search path from -L entries
663670//
664671// Strip off prefixes like "native=" or "framework=" and filter out directories
@@ -670,10 +677,7 @@ where
670677{
671678 let mut search_path = vec ! [ ] ;
672679 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) . to_path_buf ( ) ;
677681 if dir. starts_with ( & root_output) {
678682 search_path. push ( dir) ;
679683 } else {
You can’t perform that action at this time.
0 commit comments