Skip to content

Commit

Permalink
Add support for libclang 18.0.x
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleMayes committed May 29, 2024
1 parent 8ee54d6 commit cba4e80
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
## [1.8.1] - UNRELEASED

### Added
- Added support for `clang` 18.0.x

### Fixed
- Improve DLL search on Windows to take target architecture into account (e.g., ARM64 vs x86-64)
- Improved detection of `libclang` installed with Visual Studio on Windows
Expand Down
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ clang_14_0 = ["clang_13_0"]
clang_15_0 = ["clang_14_0"]
clang_16_0 = ["clang_15_0"]
clang_17_0 = ["clang_16_0"]
clang_18_0 = ["clang_17_0"]

runtime = ["libloading"]
static = []
Expand All @@ -63,4 +64,4 @@ tempfile = ">=3.0.0, <3.7.0"

[package.metadata.docs.rs]

features = ["clang_17_0", "runtime"]
features = ["clang_18_0", "runtime"]
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ To target a version of `libclang`, enable a Cargo features such as one of the fo
* `clang_3_5` - requires `libclang` 3.5 or later
* `clang_3_6` - requires `libclang` 3.6 or later
* etc...
* `clang_15_0` - requires `libclang` 15.0 or later
* `clang_16_0` - requires `libclang` 16.0 or later
* `clang_17_0` - requires `libclang` 17.0 or later
* `clang_18_0` - requires `libclang` 18.0 or later

If you do not enable one of these features, the API provided by `libclang` 3.5 will be available by default.

Expand Down
4 changes: 4 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@ cenum! {
const CXCallingConv_SwiftAsync = 17,
/// Only produced by `libclang` 15.0 and later.
const CXCallingConv_AArch64SVEPCS = 18,
/// Only produced by `libclang` 18.0 and later.
const CXCallingConv_M68kRTD = 19,
}
}

Expand Down Expand Up @@ -555,6 +557,8 @@ cenum! {
const CXCursor_OMPParallelMaskedTaskLoopSimdDirective = 304,
/// Only produced by `libclang` 16.0 and later.
const CXCursor_OMPErrorDirective = 305,
/// Only produced by `libclang` 18.0 and later.
const CXCursor_OMPScopeDirective = 306,
#[cfg(not(feature="clang_15_0"))]
const CXCursor_TranslationUnit = 300,
#[cfg(feature="clang_15_0")]
Expand Down

0 comments on commit cba4e80

Please sign in to comment.