File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed
src/tools/run-make-support/src Expand file tree Collapse file tree 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 {
7777}
7878
7979/// Creates a new symlink to a path on the filesystem, adjusting for Windows or Unix.
80+ #[ cfg( target_os = "windows" ) ]
8081pub 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 ( ) ;
8891}
8992
9093/// Construct the static library name based on the platform.
You can’t perform that action at this time.
0 commit comments