From 5d833a766e78451f5451ffacb332038444e5bc9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Cabrera?= Date: Wed, 26 Apr 2023 17:37:35 +0200 Subject: [PATCH] cranelift: Add missing control plane parameter to `compile_with_cache` (#6289) It seems that this fell through given that the incremental cache is behind a cargo feature. I noticed this while building `cranelift-codegen` via `cargo build --all-features`. I decided to add a check in CI to hopefully prevent this in the future, but I'm happy to remove it / update it if there's a better way or another way. --- .github/workflows/main.yml | 1 + crates/cranelift/src/compiler.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7108f63daf..e089694b83 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -263,6 +263,7 @@ jobs: - run: cargo check -p wasmtime --no-default-features --features cranelift,wat,async,cache - run: cargo check -p wasmtime --no-default-features --features winch - run: cargo check --features component-model + - run: cargo check -p wasmtime --features incremental-cache # Check that benchmarks of the cranelift project build - run: cargo check --benches -p cranelift-codegen diff --git a/crates/cranelift/src/compiler.rs b/crates/cranelift/src/compiler.rs index 7594a34143..1a1408a170 100644 --- a/crates/cranelift/src/compiler.rs +++ b/crates/cranelift/src/compiler.rs @@ -581,7 +581,7 @@ mod incremental_cache { let mut cache_store = CraneliftCacheStore(cache_ctx.cache_store.clone()); let (compiled_code, from_cache) = context - .compile_with_cache(isa, &mut cache_store) + .compile_with_cache(isa, &mut cache_store, &mut Default::default()) .map_err(|error| CompileError::Codegen(pretty_error(&error.func, error.inner)))?; if from_cache {