diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bc48b8a42b..9af34ff5ee 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -160,6 +160,7 @@ jobs: - i686-pc-windows-msvc - i686-unknown-linux-gnu - i686-unknown-linux-musl + - mipsel-unknown-linux-gnu - x86_64-pc-windows-gnu - x86_64-pc-windows-msvc - x86_64-apple-darwin @@ -245,6 +246,9 @@ jobs: - target: i686-unknown-linux-musl host_os: ubuntu-18.04 + - target: mipsel-unknown-linux-gnu + host_os: ubuntu-18.04 + - target: x86_64-pc-windows-gnu host_os: windows-latest diff --git a/mk/cargo.sh b/mk/cargo.sh index f9fe538114..5ab2c0c623 100755 --- a/mk/cargo.sh +++ b/mk/cargo.sh @@ -20,6 +20,7 @@ IFS=$'\n\t' rustflags_self_contained="-Clink-self-contained=yes -Clinker=rust-lld" qemu_aarch64="qemu-aarch64 -L /usr/aarch64-linux-gnu" qemu_arm="qemu-arm -L /usr/arm-linux-gnueabihf" +qemu_mipsel="qemu-system-mipsel -L /usr/mipsel-linux-gnu" # Avoid putting the Android tools in `$PATH` because there are tools in this # directory like `clang` that would conflict with the same-named tools that may @@ -90,6 +91,12 @@ case $target in export AR_i686_unknown_linux_musl=llvm-ar-$llvm_version export CARGO_TARGET_I686_UNKNOWN_LINUX_MUSL_RUSTFLAGS="$rustflags_self_contained" ;; + mipsel-unknown-linux-gnu) + export CC_mipsel_unknown_linux_gnu=mipsel-linux-gnu-gcc + export AR_mipsel_unknown_linux_gnu=mipsel-linux-gnu-gcc-ar + export CARGO_TARGET_MIPSEL_UNKNOWN_LINUX_GNU_LINKER=mipsel-linux-gnu-gcc + export CARGO_TARGET_MIPSEL_UNKNOWN_LINUX_GNU_RUNNER="$qemu_mipsel" + ;; x86_64-unknown-linux-musl) export CC_x86_64_unknown_linux_musl=clang-$llvm_version export AR_x86_64_unknown_linux_musl=llvm-ar-$llvm_version diff --git a/mk/install-build-tools.sh b/mk/install-build-tools.sh index 2011d7975a..454a737dfb 100755 --- a/mk/install-build-tools.sh +++ b/mk/install-build-tools.sh @@ -65,6 +65,12 @@ case $target in --target=i686-unknown-linux-musl|--target=x86_64-unknown-linux-musl) use_clang=1 ;; +--target=mipsel-unknown-linux-gnu) + install_packages \ + qemu-user \ + gcc-mipsel-linux-gnu \ + libc6-dev-mipsel-cross + ;; --target=wasm32-unknown-unknown) # The version of wasm-bindgen-cli must match the wasm-bindgen version. wasm_bindgen_version=$(cargo metadata --format-version 1 | jq -r '.packages | map(select( .name == "wasm-bindgen")) | map(.version) | .[0]')