Skip to content

Commit

Permalink
ci: update the LTO tests to LLVM 11 to match rustc
Browse files Browse the repository at this point in the history
  • Loading branch information
rrbutani committed Sep 1, 2020
1 parent 1515f21 commit b34ac71
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,8 @@ jobs:
export CC=clang
export CXX=clang++
export LLVM_VER=11
export UBUNTU_VER_CODENAME="$(lsb_release -cs)"
# No ld.lld on macOS: http://lists.llvm.org/pipermail/cfe-dev/2019-March/061666.html
# Also see:
Expand All @@ -223,8 +225,12 @@ jobs:
test ${{ matrix.os }} == 'macos-latest' && \
export RUSTFLAGS="-Clinker=clang -Clink-arg=-Wl,-mllvm,-threads=$(sysctl -n hw.ncpu)" \
|| {
sudo apt update && sudo apt install -y lld-10
export RUSTFLAGS="-Clinker-plugin-lto -Clinker=clang -Clink-arg=-fuse-ld=lld-10"
cat <<-EOF >> /etc/apt/source.list
deb http://apt.llvm.org/bionic/ llvm-toolchain-${UBUNTU_VER_CODENAME}-${LLVM_VER} main
deb-src http://apt.llvm.org/bionic/ llvm-toolchain-${UBUNTU_VER_CODENAME}-${LLVM_VER} main
EOF
sudo apt update && sudo apt install -y lld-${LLVM_VER}
export RUSTFLAGS="-Clinker-plugin-lto -Clinker=clang -Clink-arg=-fuse-ld=lld-${LLVM_VER}"
}
cargo run \
Expand Down

0 comments on commit b34ac71

Please sign in to comment.