Graal: Closure Compiler Native Image Builds on Windows

Created on 6 Apr 2019  路  6Comments  路  Source: oracle/graal

As soon as it's appropriate, I'd like to help test the native image builds on Windows for Closure Compiler. I don't mind to build Graal from source to do that.

https://twitter.com/thomaswue/status/1114449543729430528?s=09

native-image

Most helpful comment

We've successfully built and published a windows version using the 1.0 release.

All 6 comments

@pejovica Can you check if the current Windows support for native image is sufficient for building @ChadKillingsworth 's program?

@ChadKillingsworth I've tried the Hello World example, and it seems to work well. It won't work out-of-the-box because it needs additional configuration, but that's not Windows specific.

Getting the config for resources was straightforward, however, I used the native-image-agent to collect the reflection config as args4j seems to rely heavily on reflection.

With the config in place, you can use the following command to build an image:

mx native-image -jar compiler.jar -H:ConfigurationFileDirectories=config

And here are the config files I used for both Windows and Linux.

Thanks I will give it a go. I already have the reflection config from generating images for Unix and macos.

What jdk is currently recommended for building substratevm?

You need a JVMCI-enabled JDK 8 that has the necessary native libraries available for static linking. I used labsjdk, which can be downloaded from OTN, but OpenJDK based build should also work.

We've successfully built and published a windows version using the 1.0 release.

Was this page helpful?
0 / 5 - 0 ratings