Phantom.Code extension providing Just-In-Time asm x64 compilation based on LLVM (see my related project LLVM JIT PDB for how on-the-fly PDB debugging is done inside LLVM).
- Download, clone or fork Phantom and Phantom.Code.
- Copy (or mklink) every content of this repo, same as for the Phantom.Code repo, to your Phantom folder.
- Get LLVM 11.0
- Get LLVM JIT PDB and follow the instructions in the README to integrate it to the LLVM build pipeline
- Use
CMake
to generate theLLVM.sln
inside%YOUR_LLVM_PATH%/build/vs20XX
(XX depending on your Visual Studio version year number, ex: vs2019). - Check you have the
LLVMJITPDB
project insideLLVM.sln/Libraries
- Build
LLVM.sln/Libraries
folder, either usingDebug
orRelWithDebInfo
configurations (no, or you'll need to modify theRelease
Phantom.JIT.premake.lua
) - Open a cmd with administrator rights in
%YOUR_PHANTOM_PATH%/dependencies
- Run into the cmd
mklink /D LLVM %YOUR_LLVM_PATH%
to create a link to LLVM inside thedependencies
folder of Phantom - Run (again) the Premake-vs20XX.bat in the Phantom folder
- NOTES :
- To build LLVM somewhere else, edit
Phantom.JIT.premake.lua
- You can directly download LLVM into
%YOUR_PHANTOM_PATH%/dependencies/LLVM
and skip the cmd/mklink part above
- To build LLVM somewhere else, edit
Just explore, compile, run HelloWorld.JIT sample, insert breakpoints inside the HelloWorld.Jit.cpplite file and see how it works ! Have fun !