From 00a39efd722308e888a56e0ebb28ef64ec660077 Mon Sep 17 00:00:00 2001 From: r4bbit <445106+0x-r4bbit@users.noreply.github.com> Date: Wed, 29 Apr 2026 09:45:53 +0200 Subject: [PATCH] chore: fix RISC-V guest build on macOS 26 Add .cargo/config.toml setting CFLAGS_riscv32im_risc0_zkvm_elf to "-march=rv32im -nostdlib". This prevents cc-rs from injecting macOS-specific flags (-arch arm64, -mmacosx-version-min) into the riscv32-unknown-elf-gcc cross-compiler when building C dependencies (e.g. ring) for the guest target, which causes build failures on macOS 26 Tahoe. --- .cargo/config.toml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .cargo/config.toml diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 0000000..7e43eef --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,5 @@ +[env] +# Prevent cc-rs from injecting macOS-specific flags (e.g. -arch arm64, -mmacosx-version-min) +# into the RISC-V cross-compiler when building C dependencies (e.g. ring) for the guest target. +# Without this, builds fail on macOS 26+ with the risc0 C++ toolchain. +CFLAGS_riscv32im_risc0_zkvm_elf = "-march=rv32im -nostdlib"