-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Java truffle native image #572
Conversation
GraalVM native image compilation wasn't working due to some missing @TruffleBoundary annotations, and calls from partially evaluated code into methods that are black-listed for runtime compilation. With these changes, a GraalVM native image should be producable from every Mal step.
Sorry for the stupid question, but since when are step B to E a thing? |
They're totally not :) I was trying to stick with Mal's pedagogical approach, and add some Truffle-specific optimizations in stepwise fashion so that readers could follow along. Hopefully I haven't muddled things too much in the process. |
@mmcgill I am trying this out locally. When running
followed by lots of other similar errors. What should I do to fix this? EDIT: never mind, got it working when setting:
|
Confirming the native image works on my machine too! |
\o/ Thanks for checking :D
Apologies, I didn't think through the implications of excluding the |
I added the exclusion as a hack to work around classpath issues after importing the project into Eclipse, but this isn't the right thing to do. It prevents compilation on JDKs other than Graal, which was not my intent.
This PR addresses #568, fixing issues that prevented the compilation of GraalVM native images
for the java-truffle Mal implementation.
In addition, a
make-native.sh
convenience script has been provided for those who wish to try building native images themselves. I have not changed the Makefile or run script to use native images, as each step takes almost a minute to build on my machine. There may also be some stability issues with the AOT compilation process; out ~40 compilation attempts, I had 2 SIGSEGV crashes that were not repeatable.