File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
src/bootstrap/src/core/build_steps Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -39,8 +39,16 @@ impl GccOutput {
3939 let mut target_filename = self . libgccjit . file_name ( ) . unwrap ( ) . to_str ( ) . unwrap ( ) . to_string ( ) ;
4040 target_filename. push_str ( ".0" ) ;
4141
42+ // If we build libgccjit ourselves, then `self.libgccjit` can actually be a symlink.
43+ // In that case, we have to resolve it first, otherwise we'd create a symlink to a symlink,
44+ // which wouldn't work.
45+ let actual_libgccjit_path = t ! (
46+ self . libgccjit. canonicalize( ) ,
47+ format!( "Cannot find libgccjit at {}" , self . libgccjit. display( ) )
48+ ) ;
49+
4250 let dst = directory. join ( target_filename) ;
43- builder. copy_link ( & self . libgccjit , & dst, FileType :: NativeLibrary ) ;
51+ builder. copy_link ( & actual_libgccjit_path , & dst, FileType :: NativeLibrary ) ;
4452 }
4553}
4654
You can’t perform that action at this time.
0 commit comments