From 3779696d1c698ca2542cc9c3e1cb35e4c46c3ab2 Mon Sep 17 00:00:00 2001 From: Kyle Copperfield Date: Thu, 27 Oct 2022 08:04:27 +0000 Subject: [PATCH] use clang for all toolchains Signed-off-by: Kyle Copperfield --- .cargo/config | 8 ++++---- prepare-env.sh | 20 +------------------- rustflags.sh | 2 +- 3 files changed, 6 insertions(+), 24 deletions(-) diff --git a/.cargo/config b/.cargo/config index a055969..390f359 100644 --- a/.cargo/config +++ b/.cargo/config @@ -1,13 +1,13 @@ [build] [target.aarch64-unknown-linux-gnu] -linker = "aarch64-linux-gnu-gcc" +linker = "clang" [target.arm-unknown-linux-gnueabi] -linker = "arm-linux-gnueabi-gcc" +linker = "clang" [target.arm-unknown-linux-gnueabihf] -linker = "arm-linux-gnueabihf-gcc" +linker = "clang" [target.armv7-unknown-linux-gnueabihf] -linker = "arm-linux-gnueabihf-gcc" \ No newline at end of file +linker = "clang" diff --git a/prepare-env.sh b/prepare-env.sh index 2170321..36e41cb 100755 --- a/prepare-env.sh +++ b/prepare-env.sh @@ -2,22 +2,4 @@ set -exuo pipefail apt-get update - -PACKAGES=("git" "cmake" "g++" "libclang-dev") -case "${TARGET}" in - aarch64-unknown-linux-gnu|aarch64-unknown-linux-musl) - apt-get install -y "${PACKAGES[@]}" {cpp,g++,gcc}-aarch64-linux-gnu - ;; - arm-unknown-linux-gnueabi|arm-unknown-linux-musleabi) - apt-get install -y "${PACKAGES[@]}" {cpp,g++,gcc}-arm-linux-gnueabi - ;; - arm-unknown-linux-gnueabihf|arm-unknown-linux-musleabihf) - apt-get install -y "${PACKAGES[@]}" {cpp,g++,gcc}-arm-linux-gnueabihf - ;; - armv7-unknown-linux-gnueabihf|armv7-unknown-linux-musleabihf) - apt-get install -y "${PACKAGES[@]}" {cpp,g++,gcc}-arm-linux-gnueabihf - ;; - *) - apt-get install -y "${PACKAGES[@]}" - ;; -esac \ No newline at end of file +apt-get install -y git clang libclang-dev cmake make diff --git a/rustflags.sh b/rustflags.sh index 53b84e6..214fe01 100755 --- a/rustflags.sh +++ b/rustflags.sh @@ -5,4 +5,4 @@ if [[ "${TARGET}" == *musl ]]; then flags="${flags} -C target-feature=-crt-static" fi -echo "${flags}" \ No newline at end of file +echo "${flags}"