File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Expand file tree Collapse file tree 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
7777        my  $target  = readlink  " $src " 
7878        Alien::Build-> log (" ln -s $target  $dst " if  $opt -> {verbose };
7979        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" 
8083          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;
8292          }
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;
8693        }
8794        my  $curdir  = Path::Tiny-> cwd;
8895        #  CD into the directory, such that symlink will work on MSYS2
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments