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
4
4
5
5
## Compilation
6
6
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.
9
8
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
+ ```
11
19
12
- Then, to compile the plugin
20
+ Then, to compile the plugin:
13
21
14
22
```
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
18
25
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)
22
29
```
23
30
24
31
If 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