From 5119fb3d687bfad402efdc641fa5ef7b9a0dd11a Mon Sep 17 00:00:00 2001 From: losfair Date: Wed, 29 Jan 2020 01:07:55 +0800 Subject: [PATCH] Add musl build target for CI. --- .azure/install-rust.yml | 1 + Makefile | 6 ++++++ azure-pipelines.yml | 3 +++ 3 files changed, 10 insertions(+) diff --git a/.azure/install-rust.yml b/.azure/install-rust.yml index 243cb7bf9..c6fe4cc6f 100644 --- a/.azure/install-rust.yml +++ b/.azure/install-rust.yml @@ -43,6 +43,7 @@ steps: set -ex rustup update --no-self-update $RUST_TOOLCHAIN rustup default $RUST_TOOLCHAIN + rustup target add x86_64-unknown-linux-musl rustc -Vv cargo -V diff --git a/Makefile b/Makefile index feadb1570..96bbf55d1 100644 --- a/Makefile +++ b/Makefile @@ -258,6 +258,12 @@ check: check-bench release: cargo build --release --features backend-singlepass,backend-cranelift,backend-llvm,loader-kernel,experimental-io-devices,log/release_max_level_off +# Release with musl target +release-musl: + # backend-llvm is not included due to dependency on wabt. + # experimental-io-devices is not included due to missing x11-fb. + cargo build --release --target x86_64-unknown-linux-musl --features backend-singlepass,backend-cranelift,loader-kernel,log/release_max_level_off,wasi --no-default-features + # Only one backend (cranelift) release-clif: # If you are on macOS, you will need mingw-w64 for cross compiling to Windows diff --git a/azure-pipelines.yml b/azure-pipelines.yml index b9ccd7451..a144021f9 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -141,6 +141,9 @@ jobs: - bash: make release displayName: Build (*nix) condition: and(succeeded(), not(eq(variables['Agent.OS'], 'Windows_NT'))) + - bash: make release-musl + displayName: Build (Linux, x86_64-unknown-linux-musl) + condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux')) - bash: make release-llvm displayName: Build (Windows) condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))