Skip to content

Commit 2f244e0

Browse files
committed
feat: add Linux ARM64 clang build back
Now that cross-compilation is working efficiently, re-enable clang build for ARM64. Changes: - Add ARM64 clang to matrix - Install clang/llvm for ARM64 clang builds - Use 'clang --target=aarch64-linux-gnu' for cross-compilation - Both gcc and clang now supported for ARM64
1 parent b1aee06 commit 2f244e0

File tree

1 file changed

+22
-5
lines changed

1 file changed

+22
-5
lines changed

.github/workflows/build_node_shared.yml

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,21 @@ jobs:
2929
container: ghcr.io/ten-framework/ten_building_ubuntu2204
3030
lib_name: libnode.so.127
3131
nproc_cmd: nproc
32-
# Linux ARM64 builds (using cross-compilation) - only GCC due to toolchain availability
32+
# Linux ARM64 builds (using cross-compilation)
3333
- os: ubuntu-latest
3434
platform: linux
3535
arch: arm64
3636
compiler: gcc
3737
container: ghcr.io/ten-framework/ten_building_ubuntu2204
3838
lib_name: libnode.so.127
3939
nproc_cmd: nproc
40+
- os: ubuntu-latest
41+
platform: linux
42+
arch: arm64
43+
compiler: clang
44+
container: ghcr.io/ten-framework/ten_building_ubuntu2204
45+
lib_name: libnode.so.127
46+
nproc_cmd: nproc
4047
# macOS x64 builds
4148
# Note: macOS should use Clang (Apple's official toolchain), GCC has compatibility issues
4249
- os: macos-13
@@ -71,6 +78,9 @@ jobs:
7178
run: |
7279
apt-get update
7380
apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
81+
if [ "${{ matrix.compiler }}" = "clang" ]; then
82+
apt-get install -y clang llvm
83+
fi
7484
7585
- name: Setup Python (macOS)
7686
if: matrix.platform == 'mac'
@@ -81,10 +91,17 @@ jobs:
8191
- name: Configure and Build (Linux ARM64 with cross-compilation)
8292
if: matrix.platform == 'linux' && matrix.arch == 'arm64'
8393
run: |
84-
export CC=aarch64-linux-gnu-gcc
85-
export CXX=aarch64-linux-gnu-g++
86-
export CC_host=gcc
87-
export CXX_host=g++
94+
if [ "${{ matrix.compiler }}" = "gcc" ]; then
95+
export CC=aarch64-linux-gnu-gcc
96+
export CXX=aarch64-linux-gnu-g++
97+
export CC_host=gcc
98+
export CXX_host=g++
99+
else
100+
export CC="clang --target=aarch64-linux-gnu"
101+
export CXX="clang++ --target=aarch64-linux-gnu"
102+
export CC_host=clang
103+
export CXX_host=clang++
104+
fi
88105
89106
./configure --shared \
90107
--dest-cpu=arm64 \

0 commit comments

Comments
 (0)