Skip to content

Commit

Permalink
Remove full LTO build
Browse files Browse the repository at this point in the history
  • Loading branch information
james58899 committed Jan 8, 2024
1 parent 80b7cc6 commit 0d83f39
Showing 1 changed file with 5 additions and 21 deletions.
26 changes: 5 additions & 21 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,10 @@ env:
jobs:
build:
runs-on: ubuntu-20.04
env:
CC: clang-17
CXX: clang-17
CFLAGS: "-flto -fuse-ld=lld-17"
CXXFLAGS: "-flto -fuse-ld=lld-17"
steps:
- uses: actions/checkout@v3
- name: Install build tools
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 17
sudo apt-get install -y crossbuild-essential-arm64
run: sudo apt-get install -y crossbuild-essential-arm64
- uses: actions/cache@v3
with:
path: |
Expand All @@ -37,22 +28,15 @@ jobs:
- name: Install toolchain
run: |
rustup update
rustup toolchain install nightly
rustup target add --toolchain nightly aarch64-unknown-linux-gnu
rustup target add aarch64-unknown-linux-gnu
- name: Build x86_64
env:
RUSTFLAGS: "-Clinker-plugin-lto -Clinker=clang-17 -Clink-arg=-fuse-ld=lld-17"
run: cargo build --verbose --release
run: cargo build --verbose --release --target=x86_64-unknown-linux-gnu
- uses: actions/upload-artifact@v3
with:
name: hath-rust-x86_64
path: target/release/hath-rust
path: target/x86_64-unknown-linux-gnu/release/hath-rust
- name: Build aarch64
env:
CARGO_HOST_LINKER: "clang-17"
CARGO_HOST_RUSTFLAGS: "-Clink-arg=-fuse-ld=lld-17"
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_RUSTFLAGS: "-Clinker-plugin-lto -Clinker=clang-17 -Clink-arg=-fuse-ld=lld-17 -Clink-arg=--target=aarch64-unknown-linux-gnu"
run: cargo +nightly -Ztarget-applies-to-host -Zhost-config build --verbose --release --target=aarch64-unknown-linux-gnu
run: cargo build --verbose --release --target=aarch64-unknown-linux-gnu
- uses: actions/upload-artifact@v3
with:
name: hath-rust-aarch64
Expand Down

0 comments on commit 0d83f39

Please sign in to comment.