Skip to content

Commit 58f3f31

Browse files
committed
Fix lib path
1 parent 2a74c62 commit 58f3f31

File tree

1 file changed

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

1 file changed

+2
-3
lines changed

compiler/rustc_codegen_gcc/src/lib.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ use rustc_middle::ty::TyCtxt;
9898
use rustc_middle::util::Providers;
9999
use rustc_session::Session;
100100
use rustc_session::config::{OptLevel, OutputFilenames};
101+
use rustc_session::filesearch::make_target_lib_path;
101102
use rustc_span::Symbol;
102103
use rustc_target::spec::{Arch, RelocModel};
103104
use tempfile::TempDir;
@@ -182,9 +183,7 @@ pub struct GccCodegenBackend {
182183
static LTO_SUPPORTED: AtomicBool = AtomicBool::new(false);
183184

184185
fn libgccjit_path(sysroot_path: &Path, target_triple: &str) -> PathBuf {
185-
let sysroot_lib_dir = sysroot_path.join("lib").join("rustlib");
186-
let libgccjit_target_lib_file =
187-
sysroot_lib_dir.join(target_triple).join("lib").join("libgccjit.so");
186+
make_target_lib_path(sysroot_path, target_triple).join("libgccjit.so")
188187
}
189188

190189
fn load_libgccjit_if_needed(sysroot_path: &Path, target_triple: &str) {

0 commit comments

Comments
 (0)