From 42c1e4da836fdd8639b22cc8a19c396dfd06e70e Mon Sep 17 00:00:00 2001 From: KingKDot Date: Thu, 19 Mar 2026 00:22:10 -0500 Subject: [PATCH] add warning for no CGO with arm. --- Overlord-Server/src/server/build-process.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Overlord-Server/src/server/build-process.ts b/Overlord-Server/src/server/build-process.ts index 66237ee..dcea4d6 100644 --- a/Overlord-Server/src/server/build-process.ts +++ b/Overlord-Server/src/server/build-process.ts @@ -424,6 +424,7 @@ export async function startBuildProcess( const [os, arch, ...rest] = platform.split("-"); const goarm = arch === "armv7" ? "7" : undefined; const actualArch = goarm ? "arm" : arch; + const targetKey = `${os}/${actualArch}${goarm ? `/v${goarm}` : ""}`; const namePrefix = config.outputName || "agent"; const outputName = deps.sanitizeOutputName( platform.includes("windows") ? `${namePrefix}-${platform}.exe` : `${namePrefix}-${platform}`, @@ -443,8 +444,16 @@ export async function startBuildProcess( ...(goarm ? { GOARM: goarm } : {}), }; + if (targetKey === "windows/arm64" && env.CGO_ENABLED === "1") { + env.CGO_ENABLED = "0"; + sendToStream({ + type: "output", + text: "WARNING: windows/arm64 builds do not support CGO in this pipeline; forcing CGO disabled for this target.\n", + level: "warn", + }); + } + if (env.CGO_ENABLED === "1") { - const targetKey = `${os}/${actualArch}${goarm ? `/v${goarm}` : ""}`; const cCompilerByTarget: Record = { "linux/amd64": "gcc", "windows/amd64": "x86_64-w64-mingw32-gcc",