Skip to content

Commit 9a507c3

Browse files
committed
Add CICD logic to build on loongarch64
1 parent 28adf34 commit 9a507c3

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

.github/workflows/main.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@ jobs:
100100
system-processor: riscv64
101101
triple: riscv64-linux-gnu
102102
rtld: ld-linux-riscv64-lp64d.so.1
103+
- name: loongarch64
104+
system-processor: loongarch64
105+
triple: loongarch64-linux-gnu
106+
rtld: ld-linux-loongarch-lp64d.so.1
103107
- name: ppc64el
104108
system-processor: powerpc64le
105109
triple: powerpc64le-linux-gnu
@@ -118,7 +122,12 @@ jobs:
118122
- name: Install cross-compile toolchain and QEMU
119123
run: |
120124
sudo apt update
121-
sudo apt install libstdc++-9-dev-${{ matrix.arch.name }}-cross qemu-user ninja-build
125+
if [ "${{ matrix.arch.name }}" = "loongarch64" ]; then
126+
# No libstdc++-9 package exists for LoongArch on Ubuntu, so use version 13.
127+
sudo apt install libstdc++-13-dev-loong64-cross qemu-user ninja-build
128+
else
129+
sudo apt install libstdc++-9-dev-${{ matrix.arch.name }}-cross qemu-user ninja-build
130+
fi
122131
- name: Configure CMake
123132
run: |
124133
export LDFLAGS="-L/usr/lib/llvm-${{ matrix.llvm-version }}/lib/ -fuse-ld=lld-${{ matrix.llvm-version}} -Wl,--dynamic-linker=/usr/${{ matrix.arch.triple }}/lib/${{ matrix.arch.rtld }},-rpath,/usr/${{ matrix.arch.triple }}/lib"

0 commit comments

Comments
 (0)