Skip to content

Commit c219930

Browse files
committed
Fix lib path
1 parent 7238256 commit c219930

File tree

1 file changed

+2
-2
lines changed
  • compiler/rustc_codegen_gcc/src

1 file changed

+2
-2
lines changed

compiler/rustc_codegen_gcc/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ use rustc_middle::ty::TyCtxt;
9797
use rustc_middle::util::Providers;
9898
use rustc_session::Session;
9999
use rustc_session::config::{OptLevel, OutputFilenames};
100+
use rustc_session::filesearch::make_target_lib_path;
100101
use rustc_span::Symbol;
101102
use rustc_target::spec::{Arch, RelocModel};
102103
use tempfile::TempDir;
@@ -186,9 +187,8 @@ fn load_libgccjit_if_needed(sysroot_path: &Path, target_triple: &str) {
186187
return;
187188
}
188189

189-
let sysroot_lib_dir = sysroot_path.join("lib").join("rustlib");
190190
let libgccjit_target_lib_file =
191-
sysroot_lib_dir.join(target_triple).join("lib").join("libgccjit.so");
191+
make_target_lib_path(sysroot_path, target_triple).join("libgccjit.so");
192192
let path = libgccjit_target_lib_file.to_str().expect("libgccjit path");
193193

194194
let string = CString::new(path).expect("string to libgccjit path");

0 commit comments

Comments
 (0)