oven-sh/bun · error
--arch must be "x64" or "aarch64", got: ${targetArch}
Error message
--arch must be "x64" or "aarch64", got: ${targetArch} What it means
Error "--arch must be "x64" or "aarch64", got: ${targetArch}" thrown in oven-sh/bun.
Source
Thrown at scripts/verify-baseline.ts:62
// Last resort: resolve as a path (absolute paths like C:\intel-sde\sde.exe
// pass through unchanged, relative paths resolve against cwd)
return resolve(name);
}
const emulatorPath = resolveEmulator(values.emulator!);
const scriptDir = dirname(import.meta.path);
const repoRoot = resolve(scriptDir, "..");
const fixturesDir = join(repoRoot, "test", "js", "bun", "jsc-stress", "fixtures");
const wasmFixturesDir = join(fixturesDir, "wasm");
const preloadPath = join(repoRoot, "test", "js", "bun", "jsc-stress", "preload.js");
// Host OS (getVerifyBaselineHost() guarantees host OS == target OS here).
const isWindows = process.platform === "win32";
// Target arch (host arch may differ; --arch is explicit).
const targetArch = values.arch ?? (process.arch === "arm64" ? "aarch64" : "x64");
if (targetArch !== "x64" && targetArch !== "aarch64") {
throw new Error(`--arch must be "x64" or "aarch64", got: ${targetArch}`);
}
const isAarch64 = targetArch === "aarch64";
// SDE outputs this when a chip-check violation occurs
const SDE_VIOLATION_PATTERN = /SDE-ERROR:.*not valid for specified chip/i;
// Configure emulator based on platform
const config = isWindows
? {
runnerCmd: [emulatorPath, "-nhm", "--"],
cpuDesc: "Nehalem (SSE4.2, no AVX/AVX2/AVX512)",
// SDE must run from its own directory for Pin DLL resolution
cwd: dirname(emulatorPath),
}
: isAarch64
? {
runnerCmd: [emulatorPath, "-cpu", "cortex-a53"],
cpuDesc: "Cortex-A53 (ARMv8.0-A+CRC, no LSE/SVE)",View on GitHub (pinned to 8c5296ac45)
When it happens
Trigger: Thrown at scripts/verify-baseline.ts:62 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of oven-sh/bun@8c5296ac45 (2026-08-16).
Data as JSON: /api/errors/e00ff6e9c83352a4.
Report an issue: GitHub.