From 6b0119691522047d049c624b736dd3713cb16dcf Mon Sep 17 00:00:00 2001 From: zackees Date: Sun, 28 Jun 2026 09:30:20 -0700 Subject: [PATCH] fix(ci): set CC/CXX/AR=clang-cl/llvm-lib for xwin lanes (ring fix) soldr#1006 Lane 2. fbuild's win-arm64 lane failed at: ring@0.17.14: clang: error: no such file or directory: '/imsvc' ring's build.rs uses cc-rs which respects `CC_` (target name with underscores). cc-rs defaulted to plain `clang` and clang received clang-cl-style flags (`/imsvc ` for MSVC include dirs) which it interpreted as a missing filename arg. Set CC/CXX=clang-cl + AR=llvm-lib for both windows-msvc targets at job-env scope so every step (build, python ext, etc) picks them up. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/template_native_build.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/template_native_build.yml b/.github/workflows/template_native_build.yml index c7de9554..98fcd151 100644 --- a/.github/workflows/template_native_build.yml +++ b/.github/workflows/template_native_build.yml @@ -41,6 +41,19 @@ env: CARGO_TERM_COLOR: always RUSTFLAGS: "-D warnings" FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true" + # cc-rs env vars for the xwin lanes. ring's build.rs uses cc-rs; + # without these, cc-rs invokes plain `clang` and the curve25519.c + # compile fails with `error: no such file or directory: '/imsvc'` + # (clang-cl-style include flags on a clang driver). The vars are + # ignored by non-MSVC targets, so it's safe to set them globally. + # AR_=llvm-lib mirrors cargo-xwin's expectation so cc-rs + # archiving matches the linker side. + CC_x86_64_pc_windows_msvc: clang-cl + CXX_x86_64_pc_windows_msvc: clang-cl + AR_x86_64_pc_windows_msvc: llvm-lib + CC_aarch64_pc_windows_msvc: clang-cl + CXX_aarch64_pc_windows_msvc: clang-cl + AR_aarch64_pc_windows_msvc: llvm-lib permissions: contents: read