File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
src/tools/run-make-support/src Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -88,6 +88,10 @@ impl AuxBuildInvocationBuilder {
8888 }
8989}
9090
91+ fn path_sep ( target : & str ) -> char {
92+ if target. contains ( "windows" ) { ';' } else { ':' }
93+ }
94+
9195fn run_common ( bin_name : & str ) -> ( Command , Output ) {
9296 let target = std:: env:: var ( "TARGET" ) . unwrap ( ) ;
9397
@@ -102,18 +106,16 @@ fn run_common(bin_name: &str) -> (Command, Output) {
102106 cmd. env ( & ld_lib_path_envvar, {
103107 let mut target_rpath_env_path = String :: new ( ) ;
104108 target_rpath_env_path. push_str ( & std:: env:: var ( "TMPDIR" ) . unwrap ( ) ) ;
105- target_rpath_env_path. push ( ':' ) ;
109+ target_rpath_env_path. push ( path_sep ( & target ) ) ;
106110 target_rpath_env_path. push_str ( & std:: env:: var ( "TARGET_RPATH_ENV" ) . unwrap ( ) ) ;
107- target_rpath_env_path. push ( ':' ) ;
111+ target_rpath_env_path. push ( path_sep ( & target ) ) ;
108112 target_rpath_env_path. push_str ( & std:: env:: var ( & ld_lib_path_envvar) . unwrap ( ) ) ;
109113 target_rpath_env_path
110114 } ) ;
111115
112116 if target. contains ( "windows" ) {
113117 let mut path = std:: env:: var ( "PATH" ) . unwrap_or ( String :: new ( ) ) ;
114- if !path. is_empty ( ) {
115- path. push ( ':' ) ;
116- }
118+ path. push ( path_sep ( & target) ) ;
117119 path. push_str ( & std:: env:: var ( "TARGET_RPATH_DIR" ) . unwrap ( ) ) ;
118120 cmd. env ( "PATH" , & path) ;
119121 }
You can’t perform that action at this time.
0 commit comments