File tree 4 files changed +5
-47
lines changed
src/tools/run-make-support/src/external_deps
4 files changed +5
-47
lines changed Original file line number Diff line number Diff line change 1
1
use std:: path:: PathBuf ;
2
2
3
- use super :: cygpath:: get_windows_path;
4
3
use crate :: artifact_names:: { dynamic_lib_name, static_lib_name} ;
5
4
use crate :: external_deps:: cc:: { cc, cxx} ;
6
5
use crate :: external_deps:: llvm:: llvm_ar;
@@ -44,8 +43,7 @@ pub fn build_native_dynamic_lib(lib_name: &str) -> PathBuf {
44
43
} ;
45
44
let obj_file = if is_msvc ( ) { format ! ( "{lib_name}.obj" ) } else { format ! ( "{lib_name}.o" ) } ;
46
45
if is_msvc ( ) {
47
- let mut out_arg = "-out:" . to_owned ( ) ;
48
- out_arg. push_str ( & get_windows_path ( & lib_path) ) ;
46
+ let out_arg = format ! ( "-out:{lib_path}" ) ;
49
47
cc ( ) . input ( & obj_file) . args ( & [ "-link" , "-dll" , & out_arg] ) . run ( ) ;
50
48
} else if is_darwin ( ) {
51
49
cc ( ) . out_exe ( & lib_path) . input ( & obj_file) . args ( & [ "-dynamiclib" , "-Wl,-dylib" ] ) . run ( ) ;
Original file line number Diff line number Diff line change 1
1
use std:: path:: Path ;
2
2
3
- // FIXME(jieyouxu): can we get rid of the `cygpath` external dependency?
4
- use super :: cygpath:: get_windows_path;
5
3
use crate :: command:: Command ;
6
4
use crate :: { env_var, is_msvc, is_windows, uname} ;
7
5
@@ -97,12 +95,12 @@ impl Cc {
97
95
98
96
if is_msvc ( ) {
99
97
path. set_extension ( "exe" ) ;
100
- let fe_path = get_windows_path ( & path) ;
98
+ let fe_path = path. clone ( ) ;
101
99
path. set_extension ( "" ) ;
102
100
path. set_extension ( "obj" ) ;
103
- let fo_path = get_windows_path ( path) ;
104
- self . cmd . arg ( format ! ( "-Fe:{fe_path}" ) ) ;
105
- self . cmd . arg ( format ! ( "-Fo:{fo_path}" ) ) ;
101
+ let fo_path = path;
102
+ self . cmd . arg ( format ! ( "-Fe:{}" , fe_path . to_str ( ) . unwrap ( ) ) ) ;
103
+ self . cmd . arg ( format ! ( "-Fo:{}" , fo_path . to_str ( ) . unwrap ( ) ) ) ;
106
104
} else {
107
105
self . cmd . arg ( "-o" ) ;
108
106
self . cmd . arg ( name) ;
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -9,6 +9,3 @@ pub mod llvm;
9
9
pub mod python;
10
10
pub mod rustc;
11
11
pub mod rustdoc;
12
-
13
- // Library-internal external dependency.
14
- mod cygpath;
You can’t perform that action at this time.
0 commit comments