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 {
39
39
let mut target_filename = self . libgccjit . file_name ( ) . unwrap ( ) . to_str ( ) . unwrap ( ) . to_string ( ) ;
40
40
target_filename. push_str ( ".0" ) ;
41
41
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
+
42
50
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 ) ;
44
52
}
45
53
}
46
54
You can’t perform that action at this time.
0 commit comments