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
CMaketo generate theLLVM.slninside%YOUR_LLVM_PATH%/build/vs20XX(XX depending on your Visual Studio version year number, ex: vs2019). - Check you have the
LLVMJITPDBproject insideLLVM.sln/Libraries - Build
LLVM.sln/Librariesfolder, either usingDebugorRelWithDebInfoconfigurations (no, or you'll need to modify theReleasePhantom.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 thedependenciesfolder 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/LLVMand 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 !