Skip to content
This repository was archived by the owner on Nov 19, 2025. It is now read-only.

Commit 991b57d

Browse files
Only use musl on x64 linux
1 parent 00480e2 commit 991b57d

File tree

2 files changed

+4
-32
lines changed

2 files changed

+4
-32
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -205,36 +205,6 @@ jobs:
205205
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
206206
with:
207207
ref: ${{ inputs.release-tag || '' }}
208-
- name: Checkout musl
209-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
210-
with:
211-
repository: kraj/musl
212-
ref: c47ad25ea3b484e10326f933e927c0bc8cded3da # patched 1.2.5 version
213-
path: musl
214-
clean: false
215-
- name: Install musl
216-
run: |
217-
# See https://www.graalvm.org/latest/reference-manual/native-image/guides/build-static-executables/
218-
# Build musl from source
219-
pushd musl
220-
./configure --prefix=$MUSL_HOME --static
221-
sudo make && make install
222-
popd
223-
224-
# Install a symlink for use by native-image
225-
ln -s $MUSL_HOME/bin/musl-gcc $MUSL_HOME/bin/x86_64-linux-musl-gcc
226-
227-
# Extend the system path and confirm that musl is available by printing its version
228-
export PATH="$MUSL_HOME/bin:$PATH"
229-
x86_64-linux-musl-gcc --version
230-
231-
# Build zlib with musl from source and install into the MUSL_HOME directory
232-
curl -O https://zlib.net/fossils/zlib-1.2.13.tar.gz
233-
tar -xzvf zlib-1.2.13.tar.gz
234-
pushd zlib-1.2.13
235-
CC=musl-gcc ./configure --prefix=$MUSL_HOME --static
236-
make && make install
237-
popd
238208
- name: Use Node.js ${{ env.NODE_VERSION }}
239209
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # 4.4.0
240210
with:
@@ -275,7 +245,6 @@ jobs:
275245
- name: Build image
276246
working-directory: packages/google-closure-compiler-linux-arm64
277247
run: |
278-
export PATH="$MUSL_HOME/bin:$PATH"
279248
cp ../google-closure-compiler-java/compiler.jar compiler.jar
280249
yarn run build
281250
- name: Tests

build-scripts/graal.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,10 @@ switch (process.platform) {
6565
// On linux, statically link all libraries. Allows usage on systems
6666
// which are missing or have incompatible versions of GLIBC.
6767
// See https://www.graalvm.org/latest/reference-manual/native-image/guides/build-static-executables/
68-
NATIVE_IMAGE_BUILD_ARGS.unshift('--static', '--libc=musl');
68+
if (process.arch !== 'arm64') {
69+
NATIVE_IMAGE_BUILD_ARGS.unshift('--libc=musl');
70+
}
71+
NATIVE_IMAGE_BUILD_ARGS.unshift('--static');
6972
break;
7073
}
7174

0 commit comments

Comments
 (0)