-
Notifications
You must be signed in to change notification settings - Fork 136
Compile Java to LLVM IR #732
-
Hey,
I want to compile Java Code to LLVM IR which should be possible with RoboVM.
I installed the latest IntelliJ IDEA plugin and created a new RoboVM Console App.
My question is how can I get the LLVM IR code?
Apparently the -dump-intermediates option should dump the LLVM IR in the cache.
But when I created a run configuration with -dump-intermediates as program arguments in IntelliJ and ran the sample I did not get the .ll files.
Did is miss something or how can I do this?
Any help is greatly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions
hey, you don't need to clone robovm source code. dumpIntermediates should be working with your iOS or console project. You can create simple project from template using Idea/Android Studio plugin.
Then run ./gradlew.sh launchIPhoneSimulator from command line. Having dumpIntermediates in project gradle file will case intermediates generated
Replies: 1 comment 3 replies
-
hi,
run configurations specifies arguments that are passed to already built binary.
intermediates are being produced during the build.
there is no option to get these during build in Idea/AndroidStudio.
But you can set following in your gradle script and build it using gradle command line.
robovm {
dumpIntermediates = true
}
Beta Was this translation helpful? Give feedback.
All reactions
-
Hey,
thanks for your answer but I am sorry I am a bit lost.
I cloned the repo and added your answer as well as this to the build.gradle in robovm/plugins/gradle. When running gradle build there nothing seems to happen and running robovmInstall tells me I havent specified a target and main class.
So what are the steps in order to compile the Java code and where should I put it?
Sorry that im lost here but I havent found any solution.
Beta Was this translation helpful? Give feedback.
All reactions
-
hey, you don't need to clone robovm source code. dumpIntermediates should be working with your iOS or console project. You can create simple project from template using Idea/Android Studio plugin.
Then run ./gradlew.sh launchIPhoneSimulator from command line. Having dumpIntermediates in project gradle file will case intermediates generated
Beta Was this translation helpful? Give feedback.
All reactions
-
It worked, thank you very much. I really appreciate it.
Beta Was this translation helpful? Give feedback.