-
Notifications
You must be signed in to change notification settings - Fork 2
/
README
27 lines (20 loc) · 1.3 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
it is fork from https://github.com/fvrmatteo/TritonASTLLVMIRTranslator
*WARNINGS: tested only linux(ubuntu 20.04) and only llvm and clang version 10*
how to compile lib?
`
clang -fPIC -shared Translator.cpp `llvm-config-10 --ldflags --cxxflags --libs core --system-libs` -lboost_system -L<path to boost libraries> -ltriton -L <path to triton> -lcapstone -L<path to capstone> -o libtransTritonLLVM.so
by sample cmd:
clang -fPIC -shared Translator.cpp `llvm-config-10 --ldflags --cxxflags --libs core --system-libs` -lboost_system -L/usr/lib/x86_64-linux-gnu -ltriton -L/home/user/Triton/build/src/ -lcapstone -L/home/user/capstone/build -o libtransTritonLLVM.so
`
how to compile C++ sample?
`
clang main.cpp `llvm-config-10 --ldflags --cxxflags --libs core --system-libs` -lboost_system -L<path to boost> -ltriton -L<path to triton> -ltransTritonLLVM -L<path to libtransTritonLLVM.so> -lstdc++ -o main
by example:
clang main.cpp `llvm-config-10 --ldflags --cxxflags --libs core --system-libs` -lboost_system -L/usr/lib/x86_64-linux-gnu -ltriton -L/home/user/Triton/build/src/ -ltransTritonLLVM -L /home/user/TritonASTLLVMIRTranslator/ -lstdc++ -o main
`
how to run C++ sample?
`
LD_LIBRARY_PATH=<absolute path to libtransTritonLLVM.so> ./main
by example:
LD_LIBRARY_PATH=/home/user/TritonASTLLVMIRTranslator/ ./main
`