Skip to content

Commit 4f49edf

Browse files
committed
feat(build): add linux-x64-baseline target for older CPUs
- Add opencode-linux-x64-baseline build target for CPUs without AVX2 - Make bin/opencode respect OPENCODE_DEV_BIN env var for custom binary names
1 parent 9ca0386 commit 4f49edf

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

packages/opencode/bin/opencode

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ if (!arch) {
5151
arch = os.arch()
5252
}
5353
const base = "opencode-" + platform + "-" + arch
54-
const binary = platform === "windows" ? "opencode.exe" : "opencode"
54+
const binaryName = process.env.OPENCODE_DEV_BIN || "opencode"
55+
const binary = platform === "windows" ? binaryName + ".exe" : binaryName
5556

5657
function supportsAvx2() {
5758
if (arch !== "x64") return false

packages/opencode/script/build.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,6 @@ const allTargets: {
7979
arch: "x64",
8080
avx2: false,
8181
},
82-
{
83-
os: "linux",
84-
arch: "arm64",
85-
abi: "musl",
86-
},
8782
{
8883
os: "linux",
8984
arch: "x64",
@@ -179,7 +174,7 @@ for (const item of targets) {
179174
autoloadTsconfig: true,
180175
autoloadPackageJson: true,
181176
target: name.replace(pkg.name, "bun") as any,
182-
outfile: `dist/${name}/bin/opencode`,
177+
outfile: `dist/${name}/bin/opencode-dev`,
183178
execArgv: [`--user-agent=opencode/${Script.version}`, "--use-system-ca", "--"],
184179
windows: {},
185180
},

0 commit comments

Comments
 (0)