| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" |
| "http://www.w3.org/TR/html4/strict.dtd"> |
| <html> |
| <head> |
| <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> |
| <title>VMKit - Getting Started</title> |
| <link type="text/css" rel="stylesheet" href="menu.css" /> |
| <link type="text/css" rel="stylesheet" href="content.css" /> |
| </head> |
| <body> |
| |
| <!--#include virtual="menu.html.incl"--> |
| |
| <div id="content"> |
| |
| <h1>Getting Started: Java Ahead of Time compilation with VMKit</h1> |
| |
| |
| <p>This page gives you the instructions on how to use the Java ahead of time |
| compiler of VMKit.</p> |
| |
| |
| <ol> |
| <li><a href="/get_started.html">Checkout |
| and build VMKit</a> from SVN head.</li> |
| |
| <li>Compile into a dynamic library the core Java libs (e.g. GNU Classpath): |
| </li> |
| |
| <ul> |
| <li><tt>cd tools/vmjc/libvmjc</tt></li> |
| <li><tt>make ENABLE_OPTIMIZED=1 REQUIRES_FRAME_POINTER=1 |
| (go get coffee)</tt></li> |
| </ul> |
| |
| <li>Update PATH to include LLVM and VMKit binaries (replace *_OBJ with your |
| directory):</li> |
| <ul> |
| <li><tt>export PATH=$(LLVM_OBJ)/Release/bin:$(VMKIT_OBJ)/Release/bin |
| </tt></li> |
| </ul> |
| |
| <li>Update LD_LIBRARY_PATH to include the dynamic library previously |
| compiled (replace VMKIT_OBJ with your directory):</li> |
| <ul> |
| <li><tt>export LD_LIBRARY_PATH=$(VMKIT_OBJ)/Release/lib |
| </tt></li> |
| </ul> |
| |
| <li>Use the <tt>llcj</tt> tool on a class or a jar file:</li> |
| <ul> |
| <li><tt>llcj -S Foo.class (emit bytecode)</tt></li> |
| <li><tt>llcj --main=Foo Foo.class (generate an executable)</tt></li> |
| <li><tt>llcj -c Foo.class (generate an object file)</tt></li> |
| </ul> |
| |
| </ol> |
| |
| </div> |
| </body> |
| </html> |