File tree Expand file tree Collapse file tree 1 file changed +17
-10
lines changed Expand file tree Collapse file tree 1 file changed +17
-10
lines changed Original file line number Diff line number Diff line change @@ -4,21 +4,28 @@ LLVM obfuscation is a LLVM pass plugin, used to apply transformation on [LLVM as
44
55## Compilation
66
7- To build this plugin you need an llvm already built and installed version of llvm.
8- Please refer to [ llvm documentation] ( https://llvm.org/docs/CMake.html ) to build and install llvm to the prefix of your choice.
7+ To build this plugin you need to build LLVM. Refer to the [ documentation] ( https://llvm.org/docs/CMake.html ) for more information.
98
10- For example if you installed llvm at ` /opt/llvm ` with ` -D CMAKE_INSTALL_PREFIX=/opt/llvm ` .
9+ Here's how you can download, build and install LLVM:
10+ ```
11+ git clone --depth 1 --branch llvmorg-14.0.6 https://github.com/llvm/llvm-project.git
12+ cd llvm-project
13+
14+ mkdir -p build && cd build
15+ cmake -G "Ninja" -DCMAKE_INSTALL_PREFIX=/opt/llvm ..
16+ ninja -j$(nproc)
17+ ninja install
18+ ```
1119
12- Then, to compile the plugin
20+ Then, to compile the plugin:
1321
1422```
15- cd ~
16- git clone https://github.com/eshard/llvm-obfuscation.git
17- cd llvm-obfuscation
23+ git clone https://github.com/eshard/obfuscator-llvm.git
24+ cd obfuscator-llvm
1825
19- export LLVM_DIR=/opt/llvm/lib/cmake
20- cmake -S ~/llvm-obfuscation -B ~/tmp /llvm-obfuscation
21- cmake --build ~/tmp/llvm-obfuscation
26+ mkdir -p build && cd build
27+ cmake -G "Ninja" -DLLVM_DIR=/opt /llvm/lib/cmake ..
28+ ninja -j$(nproc)
2229```
2330
2431If the compilation is successful the plugin is ` libLLVMObfuscator.so ` and can be used with ** clang** (` -fpass-plugin= ` ) or ** opt** (` -load-pass-plugin ` ).
You can’t perform that action at this time.
0 commit comments