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

Maurizio Cimadamore mcimadamore at openjdk.org
Mon Mar 10 11:40:07 UTC 2025


On Mon, 10 Mar 2025 11:31:09 GMT, Nizar Benalla <nbenalla at openjdk.org> wrote:

>> src/main/java/org/openjdk/jextract/JextractTool.java line 456:
>> 
>>> 454:             paths.forEach(p -> builder.addClangArg("-F" + p));
>>> 455:             frameworkPaths.addAll(0, paths);
>>> 456:         }
>> 
>> My only concern left is what now happens on non-mac platforms when `-F` or `-framework` is used. I suppose clang might error out on the flag in the case of `-F`, not sure what happens for `-framework`.
>> 
>> I think these options should perhaps be disabled on platforms besides mac, since they are only intended to be used there.
>
> @mcimadamore What do you think about emitting errors on non-mac platforms?

I think we should either:
* not recognize the options when not on macos
* recognize them, but turn them into no-op (e.g. do nothing if not on macos)
If we recognize them AND try to act on them (e.g. by setting `-F` on the underlying `clang` process, I could see issue with that approach, as @JornVernee  mentions)

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

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


More information about the jextract-dev mailing list