RFR: Add support for AIX in build process [v5]
Jorn Vernee
jvernee at openjdk.org
Mon Dec 8 12:03:39 UTC 2025
On Mon, 8 Dec 2025 11:44:34 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:
>> Suchismith Roy has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains three new commits since the last revision:
>>
>> - change library lookup path:
>> - Indendtation
>> - Restore changes in Build files
>
> src/main/java/org/openjdk/jextract/clang/libclang/Index_h.java line 95:
>
>> 93: libName = f.getAbsolutePath();
>> 94: }
>> 95: SYMBOL_LOOKUP = SymbolLookup.libraryLookup(libName + "(libclang.so.14)", Arena.global());
>
> If we don't enter the `if` statement, the library name will end up as `null(libclang.so.14)`. `libraryLookup` throws an IAE when the library can not be loaded, so I think we can just construct the name and try to load the library.
> Suggestion:
>
> String javaHome = System.getProperty("java.home");
> String libName = javaHome + "/lib/libclang.a(libclang.so.14)";
> SYMBOL_LOOKUP = SymbolLookup.libraryLookup(libName, LIBRARY_ARENA);
Also, this should use `LIBRARY_ARENA`, so the library can be unloaded.
-------------
PR Review Comment: https://git.openjdk.org/jextract/pull/297#discussion_r2598307316
More information about the jextract-dev
mailing list