File tree 1 file changed +10
-7
lines changed
src/tools/run-make-support/src
1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -77,14 +77,17 @@ pub fn source_path() -> PathBuf {
77
77
}
78
78
79
79
/// Creates a new symlink to a path on the filesystem, adjusting for Windows or Unix.
80
+ #[ cfg( target_os = "windows" ) ]
80
81
pub fn create_symlink < P : AsRef < Path > , Q : AsRef < Path > > ( original : P , link : Q ) {
81
- if is_windows ( ) {
82
- use std:: os:: windows:: fs;
83
- fs:: symlink_file ( original, link) . unwrap ( ) ;
84
- } else {
85
- use std:: os:: unix:: fs;
86
- fs:: symlink ( original, link) . unwrap ( ) ;
87
- }
82
+ use std:: os:: windows:: fs;
83
+ fs:: symlink_file ( original, link) . unwrap ( ) ;
84
+ }
85
+
86
+ /// Creates a new symlink to a path on the filesystem, adjusting for Windows or Unix.
87
+ #[ cfg( target_os = "unix" ) ]
88
+ pub fn create_symlink < P : AsRef < Path > , Q : AsRef < Path > > ( original : P , link : Q ) {
89
+ use std:: os:: unix:: fs;
90
+ fs:: symlink ( original, link) . unwrap ( ) ;
88
91
}
89
92
90
93
/// Construct the static library name based on the platform.
You can’t perform that action at this time.
0 commit comments