[foreign] RFR 8216483: jextract tests have to be modified to run on Windows platform

Jorn Vernee jbvernee at xs4all.nl
Fri Jan 11 13:03:00 UTC 2019


We are not using and absolute path, but a library name, which is mapped 
in a platform dependent manner. But, libclang doesn't follow the 
standard name format. The expected name would be clang.dll, but the file 
is actually called libclang.dll, so need to manually pass in the right 
name.

Jorn

Henry Jen schreef op 2019-01-11 13:56:
>> On Jan 10, 2019, at 8:10 AM, Jorn Vernee <jbvernee at xs4all.nl> wrote:
>> 
>> Hi,
>> 
>> Continuation of [1].
>> 
>> updated webrev: 
>> http://cr.openjdk.java.net/~jvernee/panama/webrevs/windows_tests/webrev.04/
>> 
>> For the TestJextractFFI test I'm now just checking the operating 
>> system in the LibClang.java patch file:
>> 
>>    String libName = 
>> System.getProperty("os.name").startsWith("Windows")
>>            ? "libclang"
>>            : "clang”;
> 
> Why do we have this line? The prefix and suffix should be handled by
> loadLibrary if we are now using absolute path.
> 
> Cheers,
> Henry
> 
>>    Library libclang = Libraries.loadLibrary(MethodHandles.lookup(), 
>> libName);
>> 
>> The other problem is that the dll is in the bin folder vs lib folder 
>> on Windows, and the test was using the linker path which is the lib 
>> folder on Windows. There was no build system variable available for 
>> the folder that contains the library file, so instead I'm deriving it 
>> from the library file path.
>> 
>> Cheers,
>> Jorn
>> 
>> [1] : 
>> https://mail.openjdk.java.net/pipermail/panama-dev/2019-January/003691.html


More information about the panama-dev mailing list