[foreign] jextract does not filter typedefs, enums, and structs
Jorn Vernee
jbvernee at xs4all.nl
Tue Jan 15 18:30:18 UTC 2019
Some kind of 'transitive include' is exactly what I was looking for :)
(and I found the JBS ticket [1])
Deriving a list of symbols to extract from a library also sounds like a
interesting option.
Thanks,
Jorn
[1] : https://bugs.openjdk.java.net/browse/JDK-8214543
Maurizio Cimadamore schreef op 2019-01-15 18:18:
> This is a known problem - we will get there :-)
>
> I think it's already a good thing that extraction kind of works
> (albeit in a suboptimal way) :-)
>
> The goal is to use a library-centered approach where if you know which
> set of symbols you want (which can be inferred e.g. from a DLL, or
> with a regex), we will have a way to compute the minimum set of
> 'roots' that are needed in order to define a self-contained extraction
> unit.
>
> Maurizio
>
> On 15/01/2019 17:12, Jorn Vernee wrote:
>> Hello,
>>
>> Now that I'm done with the initial Windows support I have started
>> looking for interesting Windows APIs to create tests/demos with.
>> Pretty much any part of the Windows API requires users to include
>> Windows.h, which is a huge header that pretty much includes everything
>> and currently requires 14GB of RAM to extract. Trying to jextract a
>> sub-header breaks the pre-processor code in those headers.
>>
>> So, I'm using `--include-symbols` to select just the things I need,
>> but I find TreeFilter [1] lacks filtering of typedefs, structs, and
>> enums. So a lot of unneeded classes are still being generated. Why are
>> these Tree types not currently filtered?
>>
>> Thanks,
>> Jorn
>>
>> [1] :
>> http://hg.openjdk.java.net/panama/dev/file/d7885ab60131/src/jdk.jextract/share/classes/com/sun/tools/jextract/TreeFilter.java
More information about the panama-dev
mailing list