Skip to content

Commit 78daa03

Browse files
committed
chore(release): disable ARM64 outline atomics
1 parent 8e4842c commit 78daa03

3 files changed

Lines changed: 12 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ jobs:
5959
sudo apt-get install --yes musl-tools
6060
- name: Build native CLI
6161
run: cargo build --locked --release --package skilld-native --target ${{ matrix.target }}
62+
env:
63+
CFLAGS: ${{ matrix.cflags }}
6264
- name: Stage native CLI
6365
if: runner.os != 'Windows'
6466
shell: bash

scripts/release/native-packages.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export const nativePackageSpecs = Object.freeze([
1414
nativePackage({ directory: 'cli-darwin-arm64', runner: 'macos-15', target: 'aarch64-apple-darwin', os: 'darwin', cpu: 'arm64', format: 'mach-o' }),
1515
nativePackage({ directory: 'cli-darwin-x64', runner: 'macos-15-intel', target: 'x86_64-apple-darwin', os: 'darwin', cpu: 'x64', format: 'mach-o' }),
1616
nativePackage({ directory: 'cli-linux-arm64-gnu', runner: 'ubuntu-24.04-arm', target: 'aarch64-unknown-linux-gnu', os: 'linux', cpu: 'arm64', libc: 'glibc', format: 'elf' }),
17-
nativePackage({ directory: 'cli-linux-arm64-musl', runner: 'ubuntu-24.04-arm', target: 'aarch64-unknown-linux-musl', os: 'linux', cpu: 'arm64', libc: 'musl', format: 'elf' }),
17+
nativePackage({ directory: 'cli-linux-arm64-musl', runner: 'ubuntu-24.04-arm', target: 'aarch64-unknown-linux-musl', os: 'linux', cpu: 'arm64', libc: 'musl', format: 'elf', cflags: '-mno-outline-atomics' }),
1818
nativePackage({ directory: 'cli-linux-x64-gnu', runner: 'ubuntu-24.04', target: 'x86_64-unknown-linux-gnu', os: 'linux', cpu: 'x64', libc: 'glibc', format: 'elf' }),
1919
nativePackage({ directory: 'cli-linux-x64-musl', runner: 'ubuntu-24.04', target: 'x86_64-unknown-linux-musl', os: 'linux', cpu: 'x64', libc: 'musl', format: 'elf' }),
2020
nativePackage({ directory: 'cli-win32-arm64-msvc', runner: 'windows-11-arm', target: 'aarch64-pc-windows-msvc', os: 'win32', cpu: 'arm64', format: 'pe' }),
@@ -26,6 +26,7 @@ export function nativeReleaseMatrix() {
2626
include: nativePackageSpecs.map(spec => ({
2727
directory: spec.directory,
2828
executable: spec.executable,
29+
cflags: spec.cflags ?? '',
2930
libc: spec.libc ?? 'none',
3031
runner: spec.runner,
3132
target: spec.target,

tests/loader/native-packages.test.mjs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { afterEach, it } from 'vitest'
1010
import {
1111
independentPackagePublishDecision,
1212
nativePackageSpecs,
13+
nativeReleaseMatrix,
1314
npmTagForVersion,
1415
packagePublishDecision,
1516
verifyNativePackages,
@@ -110,6 +111,13 @@ it('publishes stable versions under the latest npm tag', () => {
110111
assert.equal(npmTagForVersion('3.0.0'), 'latest')
111112
})
112113

114+
it('disables GCC outline atomics for the ARM64 musl build', () => {
115+
const release = nativeReleaseMatrix()
116+
const arm64Musl = release.include.find(item => item.target === 'aarch64-unknown-linux-musl')
117+
118+
assert.equal(arm64Musl.cflags, '-mno-outline-atomics')
119+
})
120+
113121
it('rejects a release when Harness has a different v3 version', async () => {
114122
const root = await temporaryDirectory()
115123
await writeReleaseManifests(root, '3.0.0-alpha.2', '2.4.0')

0 commit comments

Comments
 (0)