Skip to content

Commit

Permalink
Add LLVM version checking
Browse files Browse the repository at this point in the history
The doc.rs docker contains LLVM-10, which may trigger the build
of the c++ code. This is not wanted for doc builds, as we use the
`llvm14-0` feature.
  • Loading branch information
jamesmth committed Oct 1, 2022
1 parent d35d752 commit 7a55048
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion llvm-plugin/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,11 @@ mod llvm_sys {
match llvm_version(&binary_name) {
// we don't need strict LLVM version checking, `llvm-sys` already
// does it for us
Ok(_) => {
Ok(version) if LLVM_VERSION_FROM_FEATURES.0 as u64 == version.major => {
// Compatible version found. Nice.
return Some(binary_name);
}
Ok(_) => continue,
Err(ref e) if e.kind() == ErrorKind::NotFound => {
// Looks like we failed to execute any llvm-config. Keep
// searching.
Expand Down

0 comments on commit 7a55048

Please sign in to comment.