Skip to content

Commit 28380d9

Browse files
cosmo0920patrick-stephens
authored andcommitted
workflows: Use lld-15 only for riscv64
Signed-off-by: Hiroshi Hatake <[email protected]>
1 parent fb653d4 commit 28380d9

File tree

1 file changed

+20
-5
lines changed

1 file changed

+20
-5
lines changed

.github/workflows/unit-tests.yaml

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -253,19 +253,34 @@ jobs:
253253
--volume "/var/lib/dbus/machine-id:/var/lib/dbus/machine-id"
254254
--volume "/etc/machine-id:/etc/machine-id"
255255
install: |
256-
dpkg --add-architecture s390x
257-
dpkg --add-architecture riscv64
258-
259256
apt-get update
260-
apt-get install -y gcc-12 g++-12 libyaml-dev flex bison libssl-dev libbpf-dev linux-tools-common lld
257+
apt-get install -y gcc-12 g++-12 libyaml-dev flex bison libssl-dev libbpf-dev linux-tools-common
258+
arch="$(dpkg --print-architecture)"
259+
case "$arch" in
260+
riscv64)
261+
apt-get install -y gcc-12 g++-12 libyaml-dev flex bison libssl-dev \
262+
libbpf-dev linux-tools-common lld-15
263+
update-alternatives --install /usr/bin/ld.lld ld.lld /usr/bin/ld.lld-15 50
264+
;;
265+
*)
266+
;;
267+
esac
261268
apt-get satisfy -y cmake "cmake (<< 4.0)"
262269
263270
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 90
264271
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 90
265272
run: |
266273
cd build
267274
export nparallel=$(( $(getconf _NPROCESSORS_ONLN) > 8 ? 8 : $(getconf _NPROCESSORS_ONLN) ))
268-
export CMAKE_LINKER_OPTION="-DCMAKE_EXE_LINKER_FLAGS=-fuse-ld=lld -DCMAKE_SHARED_LINKER_FLAGS=-fuse-ld=lld
275+
export CMAKE_LINKER_OPTION=""
276+
arch="$(dpkg --print-architecture)"
277+
case "$arch" in
278+
riscv64)
279+
export CMAKE_LINKER_OPTION='-DCMAKE_EXE_LINKER_FLAGS="-fuse-ld=lld" -DCMAKE_SHARED_LINKER_FLAGS="-fuse-ld=lld"'
280+
;;
281+
*)
282+
;;
283+
esac
269284
export FLB_OPTION="-DFLB_WITHOUT_flb-it-network=1 -DFLB_WITHOUT_flb-it-fstore=1"
270285
export FLB_OMIT_OPTION=""
271286
export GLOBAL_OPTION="-DFLB_BACKTRACE=Off -DFLB_SHARED_LIB=Off -DFLB_DEBUG=On -DFLB_ALL=On -DFLB_EXAMPLES=Off"

0 commit comments

Comments
 (0)