RFR: 7903731: Jextract should support macOS frameworks [v4]

Maurizio Cimadamore mcimadamore at openjdk.org
Wed Mar 5 12:45:06 UTC 2025


On Wed, 5 Mar 2025 10:35:56 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:

>> Nizar Benalla has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains six commits:
>> 
>>  - Respond to feedback, Update Guide
>>  - Merge branch 'refs/heads/master' into jextract-mac-os
>>    
>>    # Conflicts:
>>    #	src/main/resources/org/openjdk/jextract/impl/resources/Messages.properties
>>  - Merge remote-tracking branch 'upstream/master' into jextract-mac-os
>>  - use consistent spacing
>>  - Fix typos, rename some methods and bump copyright year to 2025
>>  - add mac os support
>
> src/main/java/org/openjdk/jextract/JextractTool.java line 605:
> 
>> 603:     private String formatFrameworkPath(String optionString) {
>> 604:         String publicPath = String.format("/System/Library/Frameworks/%1$s.framework/", optionString);
>> 605:         String privatePath = String.format("/System/Library/PrivateFrameworks/%1$s.framework/", optionString);
> 
> I think Maurizios comment still applies. AFAIU we need to pass the exact framework path to `dlopen`, so we need to manually search for the frameworks in this system location, and also in the locations specified through `-F`, and then load it from one of those locations.

Yep -- it seems to me that public/private paths are _default_ framework paths. But user can add more paths to that list, using `-F`. Btw, one related question here is what is the expected priority of the search -- e.g. should we look into `-F` paths first, and then use public/private paths as fallbacks or the other way around?

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

PR Review Comment: https://git.openjdk.org/jextract/pull/268#discussion_r1981329275


More information about the jextract-dev mailing list