Skip to content

Commit eca571b

Browse files
committed
Merge commit '3b6080cb20924f0c4f94e47bbbbfcae8b07d82e5' into sync_cg_clif-2026-04-28
1 parent 3d2e593 commit eca571b

19 files changed

Lines changed: 538 additions & 193 deletions

.github/workflows/main.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,8 @@ jobs:
242242
runs-on: ubuntu-latest
243243
timeout-minutes: 10
244244
if: ${{ github.ref == 'refs/heads/main' }}
245-
needs: [todo_check, rustfmt, test, bench, dist]
245+
# FIXME add bench back once rust-lang/cargo#16925 has been fixed
246+
needs: [todo_check, rustfmt, test, dist]
246247

247248
permissions:
248249
contents: write # for creating the dev tag and release

Cargo.lock

Lines changed: 51 additions & 42 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,28 @@ crate-type = ["dylib"]
88

99
[dependencies]
1010
# These have to be in sync with each other
11-
cranelift-codegen = { version = "0.130.0", default-features = false, features = ["std", "timing", "unwind", "all-native-arch"] }
12-
cranelift-frontend = { version = "0.130.0" }
13-
cranelift-module = { version = "0.130.0" }
14-
cranelift-native = { version = "0.130.0" }
15-
cranelift-jit = { version = "0.130.0", optional = true }
16-
cranelift-object = { version = "0.130.0" }
11+
cranelift-codegen = { version = "0.131.0", default-features = false, features = ["std", "timing", "unwind", "all-native-arch"] }
12+
cranelift-frontend = { version = "0.131.0" }
13+
cranelift-module = { version = "0.131.0" }
14+
cranelift-native = { version = "0.131.0" }
15+
cranelift-jit = { version = "0.131.0", optional = true }
16+
cranelift-object = { version = "0.131.0" }
1717
target-lexicon = "0.13"
1818
gimli = { version = "0.33", default-features = false, features = ["write"] }
19-
object = { version = "0.38.0", default-features = false, features = ["std", "read_core", "write", "archive", "coff", "elf", "macho", "pe"] }
19+
object = { version = "0.39.1", default-features = false, features = ["std", "read_core", "write", "archive", "coff", "elf", "macho", "pe"] }
2020

2121
indexmap = "2.0.0"
2222
libloading = { version = "0.9.0", optional = true }
2323
smallvec = "1.8.1"
2424

2525
[patch.crates-io]
2626
# Uncomment to use an unreleased version of cranelift
27-
#cranelift-codegen = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-43.0.0" }
28-
#cranelift-frontend = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-43.0.0" }
29-
#cranelift-module = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-43.0.0" }
30-
#cranelift-native = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-43.0.0" }
31-
#cranelift-jit = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-43.0.0" }
32-
#cranelift-object = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-43.0.0" }
27+
#cranelift-codegen = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-44.0.0" }
28+
#cranelift-frontend = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-44.0.0" }
29+
#cranelift-module = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-44.0.0" }
30+
#cranelift-native = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-44.0.0" }
31+
#cranelift-jit = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-44.0.0" }
32+
#cranelift-object = { git = "https://github.com/bytecodealliance/wasmtime.git", branch = "release-44.0.0" }
3333

3434
# Uncomment to use local checkout of cranelift
3535
#cranelift-codegen = { path = "../wasmtime/cranelift/codegen" }

build_system/build_sysroot.rs

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,7 @@ fn build_llvm_sysroot_for_triple(compiler: Compiler) -> SysrootTarget {
178178
&& !file_name_str.contains("rustc_std_workspace_")
179179
&& !file_name_str.contains("rustc_demangle")
180180
&& !file_name_str.contains("rustc_literal_escaper"))
181-
|| file_name_str.contains("chalk")
182-
|| file_name_str.contains("tracing")
183-
|| file_name_str.contains("regex")
181+
|| file_name_str.contains("LLVM")
184182
{
185183
// These are large crates that are part of the rustc-dev component and are not
186184
// necessary to run regular programs.
@@ -208,9 +206,9 @@ fn build_clif_sysroot_for_triple(
208206

209207
apply_patches(dirs, "stdlib", &sysroot_src_orig, &STDLIB_SRC.to_path(dirs));
210208

211-
// Cleanup the deps dir, but keep build scripts and the incremental cache for faster
212-
// recompilation as they are not affected by changes in cg_clif.
213-
ensure_empty_dir(&build_dir.join("deps"));
209+
// Cleanup the build dir, but keep the incremental cache for faster
210+
// recompilation as it is not affected by changes in cg_clif.
211+
ensure_empty_dir(&build_dir.join("build"));
214212
}
215213

216214
// Build sysroot
@@ -243,6 +241,7 @@ fn build_clif_sysroot_for_triple(
243241
build_cmd.arg("--features").arg("backtrace panic-unwind");
244242
build_cmd.arg(format!("-Zroot-dir={}", STDLIB_SRC.to_path(dirs).display()));
245243
build_cmd.arg("-Zno-embed-metadata");
244+
build_cmd.arg("-Zbuild-dir-new-layout");
246245
build_cmd.env("CARGO_PROFILE_RELEASE_DEBUG", "true");
247246
build_cmd.env("__CARGO_DEFAULT_LIB_METADATA", "cg_clif");
248247
if compiler.triple.contains("apple") {
@@ -254,7 +253,13 @@ fn build_clif_sysroot_for_triple(
254253
}
255254
spawn_and_wait(build_cmd);
256255

257-
for entry in fs::read_dir(build_dir.join("deps")).unwrap() {
256+
for entry in fs::read_dir(build_dir.join("build"))
257+
.unwrap()
258+
.flat_map(|entry| entry.unwrap().path().read_dir().unwrap())
259+
.map(|entry| entry.unwrap().path().join("out"))
260+
.filter(|entry| entry.exists())
261+
.flat_map(|entry| entry.read_dir().unwrap())
262+
{
258263
let entry = entry.unwrap();
259264
if let Some(ext) = entry.path().extension() {
260265
if ext == "d" || ext == "dSYM" || ext == "clif" {

0 commit comments

Comments
 (0)