Skip to content

Commit

Permalink
Merge pull request #14 from moves-rwth/link-lld
Browse files Browse the repository at this point in the history
build: use lld by default on linux
  • Loading branch information
darionhaase authored May 13, 2024
2 parents cd06d79 + 6bfaa96 commit f6a4cb1
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 11 deletions.
5 changes: 5 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[target.x86_64-unknown-linux-gnu]
rustflags = [
"-C", "link-arg=-fuse-ld=lld",
]

8 changes: 4 additions & 4 deletions .github/workflows/create_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,21 +109,21 @@ jobs:
target: ${{ matrix.target }}

- name: Install packages (Ubuntu)
if: matrix.os == 'ubuntu-latest'
if: contains(matrix.os, 'ubuntu')
shell: bash
run: |
sudo apt-get update
sudo apt-get install cmake llvm-dev libclang-dev clang
sudo apt-get install -y cmake llvm-dev libclang-dev clang lld
- name: Install packages (MacOS)
if: matrix.os == 'macos-latest'
if: contains(matrix.os, 'macos')
shell: bash
run: |
brew update
brew install cmake
- name: Install packages (Windows)
if: matrix.os == 'windows-latest'
if: contains(matrix.os, 'windows')
shell: bash
run: |
choco install -y cmake llvm
Expand Down
16 changes: 13 additions & 3 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,20 @@ name: Rust
jobs:
test:
name: Test Suite
runs-on: [self-hosted, Linux]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install packages
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y cmake llvm-dev libclang-dev clang lld
- uses: dtolnay/rust-toolchain@stable
- run: cargo test --workspace

fmt:
name: Rustfmt
runs-on: [self-hosted, Linux]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
Expand All @@ -24,9 +29,14 @@ jobs:

clippy:
name: Clippy
runs-on: [self-hosted, Linux]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install packages
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y cmake llvm-dev libclang-dev clang lld
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
FROM --platform=$BUILDPLATFORM rust:latest AS rust-builder

# install required dependencies to build z3.rs...
RUN apt-get update && apt-get install -y cmake llvm-dev libclang-dev clang
RUN apt-get update && apt-get install -y cmake llvm-dev libclang-dev clang lld

WORKDIR /root/caesar
COPY . .
Expand Down
2 changes: 1 addition & 1 deletion docker/single_platform.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
FROM rust:latest as builder

# install required dependencies to build z3.rs...
RUN apt-get update && apt-get install -y cmake llvm-dev libclang-dev clang
RUN apt-get update && apt-get install -y cmake llvm-dev libclang-dev clang lld

WORKDIR /root/caesar
COPY . .
Expand Down
4 changes: 2 additions & 2 deletions website/docs/getting-started/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ You might need to restart your terminal after installing Rust.
```bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
```
2. Install Python, CMake, LLVM and Clang using `apt`:
2. Install Python, CMake, LLVM, Clang and LLD using `apt`:
```bash
apt install python3 cmake llvm-dev libclang-dev clang
apt install python3 cmake llvm-dev libclang-dev clang lld
```

</TabItem>
Expand Down

0 comments on commit f6a4cb1

Please sign in to comment.