Skip to content

Latest commit

 

History

History
31 lines (25 loc) · 899 Bytes

README.md

File metadata and controls

31 lines (25 loc) · 899 Bytes

Build LLVM

  1. Clone the llvm-project submodule with the following commands.
git submodule init
git submodule update
  1. Navigate to koi/compiler/submodules/llvm-project.
  2. mkdir build; cd build
  3. Run the following cmake command.
cmake -G Ninja ../llvm \
   -DLLVM_TARGETS_TO_BUILD=X86 \
   -DCMAKE_BUILD_TYPE=Release \
   -DLLVM_ENABLE_ASSERTIONS=ON \
   -DCMAKE_EXPORT_COMPILE_COMMANDS=1 \
  1. Run ninja to build LLVM.
  2. Make some tea and wait :)

If you're having trouble with steps 2-6 check our LLVM's Getting Started guide.

Setup Environment

  1. Navigate back to the koi directory.
  2. Run the following command to set an environment variable.
export KOI_WORKING_DIRECTORY="$(pwd)" && export LLVM_SYS_130_PREFIX="$KOI_WORKING_DIRECTORY/compiler/submodules/llvm-project/build/"