From 5a2ff98917abecc5f20baea460a1fbdc7e7e5490 Mon Sep 17 00:00:00 2001 From: Henry Wang Date: Fri, 10 Jul 2020 11:47:30 +0800 Subject: [PATCH] ci: AArch64: Add a build stage for musl toolchain This commit adds required environment configurations to the `dev_cli.sh` and a Jenkins stage to enable AArch64 binary building using musl toolchain. Signed-off-by: Henry Wang --- Jenkinsfile | 5 +++++ scripts/dev_cli.sh | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 743e63506..85cef4930 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -83,6 +83,11 @@ pipeline{ sh "scripts/dev_cli.sh build --release" } } + stage ('Build for musl') { + steps { + sh "scripts/dev_cli.sh build --release --libc musl" + } + } stage ('Run unit tests') { steps { sh "scripts/dev_cli.sh tests --unit" diff --git a/scripts/dev_cli.sh b/scripts/dev_cli.sh index b6f7dda32..0ad286360 100755 --- a/scripts/dev_cli.sh +++ b/scripts/dev_cli.sh @@ -208,7 +208,7 @@ cmd_build() { rustflags="" if [ $(uname -m) = "aarch64" ] && [ $libc = "musl" ] ; then - rustflags="-C link-arg=-lgcc" + rustflags="-C link-arg=-lgcc -C link_arg=-specs -C link_arg=/usr/lib/aarch64-linux-musl/musl-gcc.specs" fi # A workaround on Arm64 to avoid build errors in kvm-bindings