[foreign] jextract does not filter typedefs, enums, and structs

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Tue Jan 15 17:18:15 UTC 2019


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