bigconvience / LLVM-Essentials-13

learn javassist by example
31 stars 5 forks source link

LLVM Essentials Book Code (update to LLVM 13)

Getting Started

get llvm

git clone https://github.com/llvm/llvm-project.git

build llvm

cd llvm-project
mkdir llvm-build
cd llvm-build
cmake -G "Unix Makefiles" -DLLVM_TARGETS_TO_BUILD=X86 -DCMAKE_INSTALL_PREFIX=/usr/local/clang -DCMAKE_BUILD_TYPE=Debug ../llvm/
make
make install

build clang

cd llvm-project/clang
mkdir clang-build
cd clang-build
cmake -G "Unix Makefiles" -DLLVM_TARGETS_TO_BUILD=X86 -DCMAKE_INSTALL_PREFIX=/usr/local/clang -DCMAKE_BUILD_TYPE=Debug ../clang/
make 
make install

opt

-enable-new-pm=0 work pass