RFR: Remove duplicate copies of libclang on Linux [v3]
Jorn Vernee
jvernee at openjdk.org
Mon May 27 15:54:12 UTC 2024
On Mon, 27 May 2024 15:03:23 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
>> On Linux, libclang.so is found in three forms:
>>
>> * `libclang.so.13.0.0`, this is the real library
>> * `libclang.so.13`, this is a symlink that points to the above library
>> * `libclang.so`, this is a symlink that points to the above symlink
>>
>> Because of this, and because Gradle lacks ability to distinguish between real filenames and symlinks, we end up (on Linux) with multiple versions of libclang, which significantly impact on the size of the final jextract artifact.
>>
>> The solution is to add some special logic on Linux where:
>>
>> * only `libclang.so.13.0.0` is copied from LLVM
>> * `libclang.so.13.0.0` is later renamed to `libclang.so`
>>
>> This PR implement such changes both for gradle and make build (both have been tested locally).
>
> Maurizio Cimadamore has updated the pull request incrementally with two additional commits since the last revision:
>
> - Only tweak copy path for linux, not mac (gradle)
> - Tweak conditional move
Looks good. GHA failure on Windows is due to libclang crash
-------------
Marked as reviewed by jvernee (Committer).
PR Review: https://git.openjdk.org/jextract/pull/246#pullrequestreview-2081203742
More information about the jextract-dev
mailing list