Run jextract with libclang panama style
Henry Jen
henry.jen at oracle.com
Thu Mar 15 07:31:55 UTC 2018
Please review the updated webrev[1], in which,
- Add TestJextractFFI.java as jtreg test. After considering different options, I decided to bite the bullet and simply use ProcessBuilder to run jextract and javac.
- Fix jdk.internal.clang source code to adapt recent refactoring of jdk.nicl API
I am debating whether we still want to have the Makefile and verify.sh, it’s convenient to run from command line sometimes without running jtreg and maybe more clear to developer as a sample on how to use jextract(perhaps simply use a shell script and get rid of Makefile). But not sure if that worth clogging codebase.
Thoughts?
Cheers,
Henry
[1] http://cr.openjdk.java.net/~henryjen/panama/clang-ffi/1/webrev/
> On Mar 5, 2018, at 12:10 AM, Henry Jen <henry.jen at oracle.com> wrote:
>
> Hi,
>
> This webrev[1] add a test case that
>
> 1. Run jextract against libclang
> 2. Compile the module jdk.internal.clang implemented in libclang native API using panama stack instead of JNI
> 3. Run jextract itself on top of the libclang panama stack by patching jdk.internal.clang module
> 4. Compare result from step 1 and step 3 so that both should have same result
>
> To run the test, run the verify.sh from within the test directory.
>
> As for now, it’s sort of hacked together to demonstrate the process of using native library, in this case, libclang itself. By running jextract we get to test the binding is actually working. We will need to make it fit better with the testing framework.
>
> Cheers,
> Henry
>
> [1] http://cr.openjdk.java.net/~henryjen/panama/clang-ffi/0/webrev/
More information about the panama-dev
mailing list