From f452dae9ef8a57d88dba4a376ab0077f0473fc81 Mon Sep 17 00:00:00 2001 From: aniongithub Date: Tue, 21 Apr 2026 00:22:34 -0700 Subject: [PATCH] fix: use env var for cross-compilation linker in release workflow The ~/.cargo/config.toml approach fails inside the devcontainer because CARGO_HOME points elsewhere. Use the CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER env var instead. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/release.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fc812c0..056d01f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,13 +24,13 @@ jobs: # Install cross-compilation toolchain for linux-arm64 sudo apt-get update && sudo apt-get install -y gcc-aarch64-linux-gnu rustup target add aarch64-unknown-linux-gnu x86_64-unknown-linux-gnu - mkdir -p ~/.cargo - echo '[target.aarch64-unknown-linux-gnu]' >> ~/.cargo/config.toml - echo 'linker = "aarch64-linux-gnu-gcc"' >> ~/.cargo/config.toml - # Build all Linux targets + # Build linux-x64 (native) cargo build --release --target x86_64-unknown-linux-gnu -p devpod-mcp - cargo build --release --target aarch64-unknown-linux-gnu -p devpod-mcp + + # Build linux-arm64 (cross-compile with correct linker) + CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc \ + cargo build --release --target aarch64-unknown-linux-gnu -p devpod-mcp # Copy binaries to output dir mkdir -p /tmp/release