Closed chutuananh2k closed 2 months ago
Hi,chutuananh2k.Thank you for your kind words!
I understand that setting up an environment for LLVM can be challenging for newcomers.I have already provided detailed compilation commands in the README. However, to assist you further, here's a more detailed step-by-step guide (with additional explanations compared to the instructions in the readme, particularly in the LLVM installation section):
Firstly, prepare the following compilation environment:
choco install llvm --version=18.1.5
(from here). Additionally, you need to know the location of the LLVM installation directory after installation, which should be displayed in the command output.Secondly, start compiling plugin.This step can be compiled as instructed in the readme.
x64 Native Tools Command Prompt for VS 2022
window from start menu.And all subsequent commands are executed in this window.git clone --branch ollvm-pass https://github.com/0xlane/ollvm-rust.git
.cd ollvm-rust
.cmake -G "Ninja" -S .\ollvm-pass -B .\build -DCMAKE_CXX_STANDARD=17 -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DLT_LLVM_INSTALL_DIR=D:\dev\rust_ollvm\llvm-build\llvm_x64
. Note: You need to modify LT_LLVM_INSTALL_DIR
to the previously obtained LLVM installation directory.cmake --build .\build\
Eventually, all generated files should be within the 'build' folder.
If you're just looking to try out the plugin without delving into its inner workings, you can use the precompiled plugin files provided in the repository's release.Simply call it directly on a system that has already installed VC runtime.
The command to install LLVM using choco, I haven't personally tested as I already had an LLVM environment set up and didn't need to reinstall. If choco doesn't work, you might need to look up alternative approach on google.
@0xlane Thank you very much!
Thank you for doing great work! I'm new to LLVM and don't know how to setup an environment to build the plugin. Please put an step-by-step of how to compile the plugin. Thank you very much!