Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Compile Java to LLVM IR #732

Answered by dkimitsa
NiklasHeneka asked this question in Q&A
Discussion options

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.

You must be logged in to vote

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

Comment options

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
}

You must be logged in to vote
3 replies
Comment options

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.

Comment options

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

Answer selected by NiklasHeneka
Comment options

It worked, thank you very much. I really appreciate it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /