Integrated: 7903485 Windows.h fails to extract on jextract/panama
Maurizio Cimadamore
mcimadamore at openjdk.org
Mon Jun 12 14:32:09 UTC 2023
On Thu, 1 Jun 2023 15:15:56 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
> This patch fixes a number of issues I discovered while trying to extract Windows.h on a recent jextract:
>
> * the size of `long double` layout is wrong. This means that if a struct with a field of that type is declared, StructLayoutComputer will fail (as it will see a size != expected size reported by clang)
> * There are cases where, also for unsupported layouts, we end up creating function descriptors with things containing padding. This is caused by the fact that the check for unsupported layouts in functions is performed *after* the creation of the function descriptor.
> * Sometimes libclang reports field cursors in an out-of-order fashion. I have not been able to pinpoint the exact cause, as all my attempts to create a reduced test case failed. When this behavior occurs, jextract ends up generating extra fields and padding. I believe this behavior has always been there, but now brought to the fore by the new eager checks.
> * A change in behavior of recent libclang causes `cursor.spelling()` to return non-empty strings (see https://github.com/llvm/llvm-project/issues/58429)
> * A quality of life fix, to generate "sensible" warnings when variadic callbacks are found
This pull request has now been integrated.
Changeset: ff8ce046
Author: Maurizio Cimadamore <mcimadamore at openjdk.org>
URL: https://git.openjdk.org/jextract/commit/ff8ce046eb7a5813fc76cac227f9a42ebb82bd62
Stats: 78 lines in 9 files changed: 39 ins; 25 del; 14 mod
7903485: Windows.h fails to extract on jextract/panama
Reviewed-by: jvernee
-------------
PR: https://git.openjdk.org/jextract/pull/122
More information about the jextract-dev
mailing list