RFR: Remove duplicate copies of libclang on Linux [v2]

Maurizio Cimadamore mcimadamore at openjdk.org
Mon May 27 14:36:23 UTC 2024


> 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 one additional commit since the last revision:

  Only rename libclang.so.<version> file if present

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

Changes:
  - all: https://git.openjdk.org/jextract/pull/246/files
  - new: https://git.openjdk.org/jextract/pull/246/files/d3dd2031..1f09fa86

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jextract&pr=246&range=01
 - incr: https://webrevs.openjdk.org/?repo=jextract&pr=246&range=00-01

  Stats: 2 lines in 1 file changed: 1 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jextract/pull/246.diff
  Fetch: git fetch https://git.openjdk.org/jextract.git pull/246/head:pull/246

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


More information about the jextract-dev mailing list