Skip to content

A lightweight WebAssembly runtime that is fast, secure, and standards-compliant

CI: Add a check for cranelift-codegen (only x86 and aarch64) on no_std tagets (#12812)

SSD0e51666b7df8
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index c347048b28..2d7ee5e43b 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -564,6 +564,7 @@ jobs:
cargo check -p wasmtime --no-default-features --features runtime,gc,component-model,pulley,async,debug,debug-builtins,demangle,anyhow &&
cargo check -p cranelift-control --no-default-features &&
cargo check -p cranelift-assembler-x64 --lib &&
+ cargo check -p cranelift-codegen --no-default-features --features x86,arm64 &&
cargo check -p pulley-interpreter --features encode,decode,disas,interp &&
cargo check -p wasmtime-wasi-io --no-default-features
# Use `cross` for illumos to have a C compiler/linker available.
diff --git a/cranelift/codegen/src/isa/aarch64/mod.rs b/cranelift/codegen/src/isa/aarch64/mod.rs
index e90a8aecfa..119641b33b 100644
--- a/cranelift/codegen/src/isa/aarch64/mod.rs
+++ b/cranelift/codegen/src/isa/aarch64/mod.rs
@@ -6,9 +6,11 @@ use crate::isa::aarch64::settings as aarch64_settings;
#[cfg(feature = "unwind")]
use crate::isa::unwind::systemv;
use crate::isa::{Builder as IsaBuilder, FunctionAlignment, IsaFlagsHashKey, TargetIsa};
+#[cfg(feature = "unwind")]
+use crate::machinst::CompiledCode;
use crate::machinst::{
- CompiledCode, CompiledCodeStencil, MachInst, MachTextSectionBuilder, Reg, SigSet,
- TextSectionBuilder, VCode, compile,
+ CompiledCodeStencil, MachInst, MachTextSectionBuilder, Reg, SigSet, TextSectionBuilder, VCode,
+ compile,
};
use crate::result::CodegenResult;
use crate::settings as shared_settings;
@@ -16,7 +18,9 @@ use alloc::string::String;
use alloc::{boxed::Box, vec::Vec};
use core::fmt;
use cranelift_control::ControlPlane;
-use target_lexicon::{Aarch64Architecture, Architecture, OperatingSystem, Triple};
+#[cfg(feature = "unwind")]
+use target_lexicon::OperatingSystem;
+use target_lexicon::{Aarch64Architecture, Architecture, Triple};
// New backend:
mod abi;