Comments (8)
Working on a solution.
from clang-sys.
Tip: in bindgen, replace the clang-sys version by a path to a local checkout of clang-sys. You can then easily test changes in clang-sys. It would be better to have a dummy test bin, though.
from clang-sys.
In fact no, you can simply run cargo test --features static
.
from clang-sys.
Yeah, that's what I thought.
I'm closer to a solution now, static linking is working with 3.5, 3.6, and 3.7 on Linux.
from clang-sys.
I'm stumped, it seems the 3.8 releases neglected to include libclang.a
. We may need to disallow static linking in this case. I'm emailing the clang mailing lists to see what this is about.
from clang-sys.
ahah ^^
from clang-sys.
OK, static linking works on Linux and OS X for clang < 3.8.
I added a LLVM_CONFIG_PATH
environment variable for setting the path to an llvm-config
executable. This is necessary because llvm-config --libs
returns different lists of libraries depending on the version of LLVM llvm-config
was compiled for. This means you need to set this to test static linking so you don't get linking errors (Linux, OS X).
from clang-sys.
cool!
from clang-sys.
Related Issues (20)
- 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
- Detect LLVM installation directory in visual studio on Windows HOT 1
- Support LLVM libc++ HOT 1
- CLANG_PATH is not being used with feature `runtime` HOT 2
- clang_sys::load tries to load ARM64 library on x64 Windows HOT 1
- Provide an API to get the `clang` matching the loaded `libclang.so` HOT 2
- linking is not supported for non-msvc windows targets HOT 3
- Static linking doesn't work HOT 6
- clang-sys looks for a "-target" flag to determine the cross-compilation target, but the flag is actually called "--target" HOT 3
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.