[foreign] RFR 8216483: jextract tests have to be modified to run on Windows platform
Sundararajan Athijegannathan
sundararajan.athijegannathan at oracle.com
Fri Jan 11 12:59:33 UTC 2019
Hi Henry,
The Windows dll name is "libclang.dll" and not "clang.dll" as one would
expect! Our auto library name matching would add "lib"/"" as prefix and
".so"/".dylib"/".dll" as suffix - which won't work in this case.
-Sundar
On 11/01/19, 6:26 PM, Henry Jen wrote:
>
>> 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