File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
compiler/rustc_codegen_gcc/src Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -98,7 +98,6 @@ use rustc_middle::ty::TyCtxt;
9898use rustc_middle:: util:: Providers ;
9999use rustc_session:: Session ;
100100use rustc_session:: config:: { OptLevel , OutputFilenames } ;
101- use rustc_session:: filesearch:: make_target_lib_path;
102101use rustc_span:: Symbol ;
103102use rustc_target:: spec:: { Arch , RelocModel } ;
104103use tempfile:: TempDir ;
@@ -207,8 +206,15 @@ impl CodegenBackend for GccCodegenBackend {
207206 }
208207
209208 fn init ( & self , sess : & Session ) {
210- fn file_path ( path : & Path , sess : & Session ) -> PathBuf {
211- make_target_lib_path ( path, & sess. target . llvm_target ) . join ( "libgccjit.so" )
209+ fn file_path ( sysroot_path : & Path , sess : & Session ) -> PathBuf {
210+ let rustlib_path =
211+ rustc_target:: relative_target_rustlib_path ( sysroot_path, & sess. host . llvm_target ) ;
212+ sysroot_path
213+ . join ( rustlib_path)
214+ . join ( "codegen-backends" )
215+ . join ( "lib" )
216+ . join ( sess. target . llvm_target . as_ref ( ) )
217+ . join ( "libgccjit.so" )
212218 }
213219
214220 // We use all_paths() instead of only path() in case the path specified by --sysroot is
You can’t perform that action at this time.
0 commit comments