File tree 2 files changed +12
-4
lines changed
2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change
1
+ int boot_compilet () { return 1 ; }
Original file line number Diff line number Diff line change @@ -77,12 +77,19 @@ sub _mirror
77
77
my $target = readlink " $src " ;
78
78
Alien::Build-> log (" ln -s $target $dst " ) if $opt -> {verbose };
79
79
if (path($target )-> is_relative) {
80
+ my $nativesymlink =
81
+ (($^O eq " msys" && defined $ENV {MSYS } && $ENV {MSYS } eq " winsymlinks:nativestrict" )
82
+ || ($^O eq " cygwin" && defined $ENV {CYGWIN } && $ENV {CYGWIN } eq " winsymlinks:nativestrict" ));
80
83
if (!$src -> parent-> child($target )-> exists ) {
81
- die " cannot create symlink to nonexistent file $target on MSYS2" ;
84
+ if ($nativesymlink ) {
85
+ # NOTE: On linux, it is OK to create broken symlinks, but it is not allowed on
86
+ # windows MSYS2/Cygwin when nativestrict is used.
87
+ die " cannot create native symlink to nonexistent file $target on $^O" ;
88
+ }
89
+ }
90
+ if ($nativesymlink ) {
91
+ $dst -> parent-> child($target )-> touchpath;
82
92
}
83
- # NOTE: On linux, it is OK to create broken symlinks, but it is not allowed on
84
- # windows MSYS2, so make sure the target exists.
85
- $dst -> parent-> child($target )-> touchpath;
86
93
}
87
94
my $curdir = Path::Tiny-> cwd;
88
95
# CD into the directory, such that symlink will work on MSYS2
You can’t perform that action at this time.
0 commit comments