clang/find_clang.cr: Auto-detect if linking libclang using .a or .so #66
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello,
Was toying with bindgen today and noticed that ArchLinux joined the
distros who want static linking of libclang. It annoyed me so in OSS
fashion I decided to do something about it.
If both static and dynamic versions are available it'll prefer the
static library, which is hopefully more stable when the user decides
to update their system. The user can still use
BINDGEN_DYNAMIC=1/0
as before, but simply not setting it will trigger the auto-detection.
However this could break stuff horribly on non-ArchLinux machines,
so I PR'd this before I break
master
out of the blue. Does this work foreveryone?
Also,
find_clang.cr
has code to read the OS name to force the defaultto static linking on a bunch of distros - Do we still need this code with
this change?
Cheers!