Skip to content

Commit

Permalink
Merge pull request #2 from aquarhead/llvm-12-doc-test
Browse files Browse the repository at this point in the history
Update doc and test to LLVM 12
  • Loading branch information
alessandrod authored Jun 17, 2021
2 parents 17fd952 + 7816093 commit e95db63
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 28 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ jobs:
- name: Install LLVM
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
echo -e "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-11 main\n" | sudo tee /etc/apt/sources.list.d/llvm.list
echo -e "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-12 main\n" | sudo tee /etc/apt/sources.list.d/llvm.list
sudo apt-get update
sudo apt-get install llvm-11-dev libclang-11-dev
sudo apt-get install llvm-12-dev libclang-12-dev
- name: Build linking to external LLVM
run: cargo build --verbose
Expand Down
17 changes: 2 additions & 15 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ files with embedded bitcode (.o), optionally stored inside ar archives (.a).

# Installation

The linker requires LLVM 11.
The linker requires LLVM 12.

On Debian based distributions you need to install the `llvm-11-dev` and
`libclang-11-dev` packages. If your distro doesn't have them you can get them
On Debian based distributions you need to install the `llvm-12-dev` and
`libclang-12-dev` packages. If your distro doesn't have them you can get them
from the official LLVM repo at https://apt.llvm.org.

On rpm based distribution you need the `llvm-devel` and `clang-devel` packages.
If your distro doesn't have them you can get them from Fedora Rawhide.

Once you have installed LLVM 11 you can install the linker running:
Once you have installed LLVM 12 you can install the linker running:
```
cargo install bpf-linker
```
Expand Down Expand Up @@ -112,4 +112,4 @@ bpf-linker is licensed under either of
- Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)

at your option.
at your option.
2 changes: 1 addition & 1 deletion tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ fn run_mode(mode: &'static str) {
config.target = "bpfel-unknown-none".to_string();
}
config.target_rustcflags = Some(rustc_flags);
config.llvm_filecheck = Some("FileCheck-11".into());
config.llvm_filecheck = Some("FileCheck-12".into());
config.mode = mode.parse().expect("Invalid mode");
config.src_base = PathBuf::from(format!("tests/{}", mode));
config.link_deps(); // Populate config.target_rustcflags with dependencies on the path
Expand Down
2 changes: 1 addition & 1 deletion third-party/rustc-llvm-proxy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ libloading = "0.5"
lazy_static = "1.0"
failure = "0.1"
libc = "0.2"
llvm-sys = { version = "110", features = ["no-llvm-linking", "disable-alltargets-init"] }
llvm-sys = { version = "120", features = ["no-llvm-linking", "disable-alltargets-init"] }

[build-dependencies]
cargo_metadata = "0.8"
Expand Down
5 changes: 3 additions & 2 deletions third-party/rustc-llvm-proxy/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,11 @@ mod llvm {
"disassembler.rs",
"error_handling.rs",
"initialization.rs",
"link_time_optimizer.rs",
"lto.rs",
"object.rs",
"orc.rs",
"orc2/ee.rs",
"orc2/lljit.rs",
"orc2/mod.rs",
"support.rs",
"target.rs",
"target_machine.rs",
Expand Down
5 changes: 3 additions & 2 deletions third-party/rustc-llvm-proxy/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,11 @@ pub mod proxy {
use llvm_sys::error::*;
use llvm_sys::error_handling::*;
use llvm_sys::execution_engine::*;
use llvm_sys::link_time_optimizer::*;
use llvm_sys::lto::*;
use llvm_sys::object::*;
use llvm_sys::orc::*;
use llvm_sys::orc2::ee::*;
use llvm_sys::orc2::lljit::*;
use llvm_sys::orc2::*;
use llvm_sys::prelude::*;
use llvm_sys::target::*;
use llvm_sys::target_machine::*;
Expand Down

0 comments on commit e95db63

Please sign in to comment.