Fix cross-compilation target by passing os/arch via --target flag instead of env vars

This commit is contained in:
Chris Wanstrath 2026-02-19 11:25:03 -08:00
parent fca779b064
commit c16fdaa2a2

View File

@ -44,7 +44,7 @@ async function buildTarget(target: BuildTarget) {
ENTRY_POINT, ENTRY_POINT,
'--compile', '--compile',
'--target', '--target',
'bun', `bun-${target.os}-${target.arch}`,
'--minify', '--minify',
'--sourcemap=external', '--sourcemap=external',
'--outfile', '--outfile',
@ -52,11 +52,6 @@ async function buildTarget(target: BuildTarget) {
], { ], {
stdout: 'inherit', stdout: 'inherit',
stderr: 'inherit', stderr: 'inherit',
env: {
...process.env,
BUN_TARGET_OS: target.os,
BUN_TARGET_ARCH: target.arch,
},
}) })
const exitCode = await proc.exited const exitCode = await proc.exited