Simple example demonstates howto compile HelloWorld in command line
Code: Select all
c:\suok5\Mob>Blwe\omlsh co -odc OmtestHelloWorld
oml:compiling c:\suok5\Mob/Omtest/Mod/HelloWorld.odc >c:\suok5\Mob/Omtest/Clwe/OmtestHelloWorld .ll=9742 .bc=3420
Compilation results in .ll and .bc bytecode files
After this, the program can be executed in LLVM JIT compiler
Code: Select all
c:\suok5\Mob>Blwe\omlsh run -ext bc OmtestHelloWorld
Hello, World
But loading in JIT is too time-consuming.
Just compile this to object file.
Code: Select all
c:\suok5\Mob>Blwe\omlsh build OmtestHelloWorld
===== obj-building HostConLog ... done
===== obj-building OmtestHelloWorld ... done
After this, the object file can be loaded with all necessary fixups
Code: Select all
c:\suok5\Mob>Blwe\omlsh run OmtestHelloWorld
Hello, World
If we need 64-bit, use the similar shell from Blwr directory. Blwr is 64-bit binary catalog. Blwr differs from Blwe, as RAX register differs from EAX. Compile
Code: Select all
c:\suok5\Mob>Blwr\omlsh co -odc OmtestHelloWorld
oml:compiling c:\suok5\Mob/Omtest/Mod/HelloWorld.odc >c:\suok5\Mob/Omtest/Clwr/OmtestHelloWorld .ll=9742 .bc=3424
Build
Code: Select all
c:\suok5\Mob>Blwr\omlsh build OmtestHelloWorld
===== obj-building HostConLog ... done
===== obj-building OmtestHelloWorld ... done
And Run
Code: Select all
c:\suok5\Mob>Blwr\omlsh run OmtestHelloWorld
Hello, World