From 3bb9f1070e4c6738b529fca09951e200ff8dd915 Mon Sep 17 00:00:00 2001 From: james58899 Date: Sat, 16 Mar 2024 08:22:56 +0000 Subject: [PATCH] Test llvm latest --- .github/workflows/build.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5d5e4f8..fd66177 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -31,18 +31,18 @@ jobs: matrix: target: ["x86_64-unknown-linux-gnu", "aarch64-unknown-linux-gnu", "armv7-unknown-linux-gnueabihf"] env: - CC: clang-18 - CXX: clang-18 - CFLAGS: "-flto -fuse-ld=lld-18" - CXXFLAGS: "-flto -fuse-ld=lld-18" + CC: clang + CXX: clang + CFLAGS: "-flto -fuse-ld=lld" + CXXFLAGS: "-flto -fuse-ld=lld" steps: - uses: actions/checkout@v4 - name: Install build tools run: | - wget https://apt.llvm.org/llvm.sh - chmod +x llvm.sh - sudo ./llvm.sh 18 - sudo apt-get install -y crossbuild-essential-arm64 crossbuild-essential-armhf + wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc + echo "deb http://apt.llvm.org/focal/ llvm-toolchain-focal main" | sudo tee /etc/apt/sources.list.d/llvm.list + sudo apt-get update + sudo apt-get install -y crossbuild-essential-arm64 crossbuild-essential-armhf clang lld - uses: actions/cache@v4 with: path: | @@ -59,11 +59,11 @@ jobs: rustup target add --toolchain nightly ${{ matrix.target }} - name: Build env: - CARGO_HOST_LINKER: "clang-18" - CARGO_HOST_RUSTFLAGS: "-Clink-arg=-fuse-ld=lld-18" - CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUSTFLAGS: "-Clinker-plugin-lto -Clinker=clang-18 -Clink-arg=-fuse-ld=lld-18 -Clink-arg=--target=x86_64-unknown-linux-gnu" - CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_RUSTFLAGS: "-Clinker-plugin-lto -Clinker=clang-18 -Clink-arg=-fuse-ld=lld-18 -Clink-arg=--target=aarch64-unknown-linux-gnu" - CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_RUSTFLAGS: "-Clinker-plugin-lto -Clinker=clang-18 -Clink-arg=-fuse-ld=lld-18 -Clink-arg=--target=armv7-unknown-linux-gnueabihf" + CARGO_HOST_LINKER: "clang" + CARGO_HOST_RUSTFLAGS: "-Clink-arg=-fuse-ld=lld" + CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUSTFLAGS: "-Clinker-plugin-lto -Clinker=clang -Clink-arg=-fuse-ld=lld -Clink-arg=--target=x86_64-unknown-linux-gnu" + CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_RUSTFLAGS: "-Clinker-plugin-lto -Clinker=clang -Clink-arg=-fuse-ld=lld -Clink-arg=--target=aarch64-unknown-linux-gnu" + CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_RUSTFLAGS: "-Clinker-plugin-lto -Clinker=clang -Clink-arg=-fuse-ld=lld -Clink-arg=--target=armv7-unknown-linux-gnueabihf" run: cargo +nightly -Ztarget-applies-to-host -Zhost-config build --verbose --release --target=${{ matrix.target }} - uses: actions/upload-artifact@v4 with: