Skip to content

Commit d0e6d77

Browse files
committed
Auto merge of #150215 - GuillaumeGomez:subtree-update_cg_gcc_2025-12-21, r=antoyo
sync GCC backend 2025-12-21 r? ghost
2 parents cb79c42 + d5b6bd8 commit d0e6d77

File tree

5 files changed

+118
-31
lines changed

5 files changed

+118
-31
lines changed

compiler/rustc_codegen_gcc/build_system/src/build.rs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,14 +111,20 @@ pub fn build_sysroot(env: &HashMap<String, String>, config: &ConfigInfo) -> Resu
111111

112112
// Symlink libgccjit.so to sysroot.
113113
let lib_path = start_dir.join("sysroot").join("lib");
114+
let rustlib_target_path = lib_path
115+
.join("rustlib")
116+
.join(&config.host_triple)
117+
.join("codegen-backends")
118+
.join("lib")
119+
.join(&config.target_triple);
114120
let libgccjit_path =
115121
PathBuf::from(config.gcc_path.as_ref().expect("libgccjit should be set by this point"))
116122
.join("libgccjit.so");
117-
let libgccjit_in_sysroot_path = lib_path.join("libgccjit.so");
123+
let libgccjit_in_sysroot_path = rustlib_target_path.join("libgccjit.so");
118124
// First remove the file to be able to create the symlink even when the file already exists.
119125
let _ = fs::remove_file(&libgccjit_in_sysroot_path);
120-
create_dir(&lib_path)?;
121-
symlink(libgccjit_path, libgccjit_in_sysroot_path)
126+
create_dir(&rustlib_target_path)?;
127+
symlink(libgccjit_path, &libgccjit_in_sysroot_path)
122128
.map_err(|error| format!("Cannot create symlink for libgccjit.so: {}", error))?;
123129

124130
let library_dir = start_dir.join("sysroot_src").join("library");
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[toolchain]
2-
channel = "nightly-2025-11-24"
2+
channel = "nightly-2025-12-20"
33
components = ["rust-src", "rustc-dev", "llvm-tools-preview"]

0 commit comments

Comments
 (0)