From 939e6f0bc76e71bfb3f99ff61ceec4bedf303d32 Mon Sep 17 00:00:00 2001 From: Benoit Blanchon Date: Sun, 5 Nov 2023 12:24:58 +0100 Subject: [PATCH] Musl: add arm64 v8 Relates to #134 --- .github/workflows/build-all.yml | 16 +++++++++++++++- README.md | 7 ++++++- steps/05-configure.sh | 14 +++++++++++++- 3 files changed, 34 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-all.yml b/.github/workflows/build-all.yml index e3b23c07..648f484f 100644 --- a/.github/workflows/build-all.yml +++ b/.github/workflows/build-all.yml @@ -269,7 +269,7 @@ jobs: enable_v8: true linux_musl_arm64: - name: Linux musl arm64 + name: Linux musl ARM64 uses: ./.github/workflows/build.yml with: branch: ${{ github.event.inputs.branch }} @@ -280,6 +280,19 @@ jobs: target_libc: musl enable_v8: false + linux_musl_arm64_v8: + name: Linux musl ARM64 V8 + if: github.event.inputs.enable_v8 == 'true' + uses: ./.github/workflows/build.yml + with: + branch: ${{ github.event.inputs.branch }} + version: ${{ github.event.inputs.version }} + is_debug: ${{ github.event.inputs.is_debug == 'true' }} + target_os: linux + target_cpu: arm64 + target_libc: musl + enable_v8: true + linux_musl_x64: name: Linux musl x64 uses: ./.github/workflows/build.yml @@ -644,6 +657,7 @@ jobs: - linux_arm64 - linux_arm64_v8 - linux_musl_arm64 + - linux_musl_arm64_v8 - linux_musl_x64 - linux_musl_x64_v8 - linux_musl_x86 diff --git a/README.md b/README.md index 85a5b9e7..8f0114e8 100644 --- a/README.md +++ b/README.md @@ -87,7 +87,12 @@ Here are the download links for latest release: - Linux
musl + Linux
musl + arm64 + pdfium-linux-musl-arm64.tgz + pdfium-v8-linux-musl-arm64.tgz + + x64 pdfium-linux-musl-x64.tgz pdfium-v8-linux-musl-x64.tgz diff --git a/steps/05-configure.sh b/steps/05-configure.sh index 7a0a0d2b..7681e767 100755 --- a/steps/05-configure.sh +++ b/steps/05-configure.sh @@ -50,7 +50,19 @@ mkdir -p "$BUILD" echo 'is_musl = true' echo 'is_clang = false' echo 'use_custom_libcxx = false' - [ "$ENABLE_V8" == "true" ] && echo "v8_snapshot_toolchain = \"//build/toolchain/linux:$TARGET_CPU\"" + + # The v8 snapshot needs to be built by code that is compiled with a + # toolchain that matches the bit-width of the target CPU, but runs on + # the host. + # pdfium/v8/gni/snapshot_toolchain.gni + [ "$ENABLE_V8" == "true" ] && case "$TARGET_CPU" in + arm|x86) + echo "v8_snapshot_toolchain = \"//build/toolchain/linux:x86\"" + ;; + arm64|x64) + echo "v8_snapshot_toolchain = \"//build/toolchain/linux:x64\"" + ;; + esac ;; esac