Integrated: Remove duplicate copies of libclang on Linux

Maurizio Cimadamore mcimadamore at openjdk.org
Tue May 28 10:37:13 UTC 2024


On Mon, 27 May 2024 14:09:51 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).

This pull request has now been integrated.

Changeset: 2fb93f96
Author:    Maurizio Cimadamore <mcimadamore at openjdk.org>
URL:       https://git.openjdk.org/jextract/commit/2fb93f965a3dc8ec8290a89527e9fa21c5907dd5
Stats:     18 lines in 3 files changed: 16 ins; 0 del; 2 mod

Remove duplicate copies of libclang on Linux

Reviewed-by: jvernee

-------------

PR: https://git.openjdk.org/jextract/pull/246


More information about the jextract-dev mailing list