Comments (4)
No. There isn't a reliable way to parse clang --version
as it differs from platform to platform, so I didn't even try.
However, now that I think about it, there may be a better way. You get linking errors if you attempt to call a clang 3.9 function but have linked to an earlier version of clang, so I might be able to detect the version of clang in use by attempting to compile a program using non-3.5 features in build.rs
, I'll look into it soon.
from clang-sys.
I also think that would be more reliable (it compiles or not ^^).
from clang-sys.
I've actually gone an implemented this, but now that I've thought about it more I don't think it adds much. You will find out if your version of clang is insufficient when to attempt to use a function that your version of clang does not support by way of a link error. This would cause the failure to be one step earlier, but at the cost of added complexity and the risk of false positives.
from clang-sys.
That was mostly to add better error messages.
from clang-sys.
Related Issues (20)
- Build fails on `nightly-2021-04-11` with `runtime` feature enabled. HOT 3
- Clang-sys features not additive
- clang-sys does not build on rust 1.53 Nightly HOT 1
- "patterns aren't allowed in methods without bodies" when trying to compile HOT 1
- LIBCLANG_PATH cannot contain special characters such as `[` or `]` HOT 1
- Unable to find libclang on MacOS with Homebrew LLVM install HOT 1
- could not run executable : Permission denied (os error 13) HOT 10
- No `clang_getToken` binding in clang-sys HOT 1
- Cannot find libclang HOT 3
- Support for cray-clang
- cc + bindgen build : clang-sys errors with `a libclang shared library is not loaded on this thread`
- Build on alpine with libclang-static fail
- Apk
- Tries to load libclang.dll from MinGW instead of native one on Windows HOT 4
- Defaulting to older libclang on Windows (Inconvenient directory prioritization) HOT 3
- Latest release broke builds HOT 7
- By this limitation, I unable to use X32 ABI to compile stuff. HOT 1
- lib.rs seems hand written, why bindgen was not used in the first place? HOT 1
- Getting ASTReadError on Linux but not on Windows
- "This crate only supports `libclang` 3.5 and later" with libclang 3.8 identified HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clang-sys.