This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +5
-47
lines changed
src/tools/run-make-support/src/external_deps Expand file tree Collapse file tree 4 files changed +5
-47
lines changed Original file line number Diff line number Diff line change 11use std:: path:: PathBuf ;
22
3- use super :: cygpath:: get_windows_path;
43use crate :: artifact_names:: { dynamic_lib_name, static_lib_name} ;
54use crate :: external_deps:: cc:: { cc, cxx} ;
65use crate :: external_deps:: llvm:: llvm_ar;
@@ -44,8 +43,7 @@ pub fn build_native_dynamic_lib(lib_name: &str) -> PathBuf {
4443 } ;
4544 let obj_file = if is_msvc ( ) { format ! ( "{lib_name}.obj" ) } else { format ! ( "{lib_name}.o" ) } ;
4645 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}" ) ;
4947 cc ( ) . input ( & obj_file) . args ( & [ "-link" , "-dll" , & out_arg] ) . run ( ) ;
5048 } else if is_darwin ( ) {
5149 cc ( ) . out_exe ( & lib_path) . input ( & obj_file) . args ( & [ "-dynamiclib" , "-Wl,-dylib" ] ) . run ( ) ;
Original file line number Diff line number Diff line change 11use std:: path:: Path ;
22
3- // FIXME(jieyouxu): can we get rid of the `cygpath` external dependency?
4- use super :: cygpath:: get_windows_path;
53use crate :: command:: Command ;
64use crate :: { env_var, is_msvc, is_windows, uname} ;
75
@@ -97,12 +95,12 @@ impl Cc {
9795
9896 if is_msvc ( ) {
9997 path. set_extension ( "exe" ) ;
100- let fe_path = get_windows_path ( & path) ;
98+ let fe_path = path. clone ( ) ;
10199 path. set_extension ( "" ) ;
102100 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 ( ) ) ) ;
106104 } else {
107105 self . cmd . arg ( "-o" ) ;
108106 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;
99pub mod python;
1010pub mod rustc;
1111pub mod rustdoc;
12-
13- // Library-internal external dependency.
14- mod cygpath;
You can’t perform that action at this time.
0 commit comments