Check the Wiki for more information on the compiler and the WIP language.
LLVM 20 is required to build the compiler. LLVM's website has instructions for installing on several popular Linux distributions. For example, run the following commands to install LLVM 20 on Ubuntu 24.04:
# add repository to package manager
wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc
sudo apt-add-repository -y "deb http://apt.llvm.org/noble/ llvm-toolchain-noble-20 main"
# install
sudo apt-get update
sudo apt-get install -y clang-20Clone the repo and go to the root directory.
git clone [email protected]:jbw3/compiler.git
cd compiler
Build with cmake.
Debug:
mkdir debug
cd debug
cmake ../src -DCMAKE_CXX_COMPILER=clang++-20 -DLLVM_DIR=/usr/lib/llvm-20/cmake -DCMAKE_BUILD_TYPE=Debug
make
Release:
mkdir release
cd release
cmake ../src -DCMAKE_CXX_COMPILER=clang++-20 -DLLVM_DIR=/usr/lib/llvm-20/cmake -DCMAKE_BUILD_TYPE=Release
make
LLVM 20 is required to build the compiler.
The standard LLVM Windows install is not sufficient to be able to build against LLVM.
Instead, the LLVM source must be downloaded and built from scratch.
Download the source code (Source code (tar.gz)) from here.
Configure the LLVM project.
The following assumes the LLVM source has been extracted into a directory named llvm-project-llvmorg-20.1.8.
cd llvm-project-llvmorg-20.1.8
cmake -S llvm -B build -Thost=x64
Build and install debug:
cd build
cmake --build . --config Debug --target INSTALL
Clone the repo and go to the root directory.
git clone [email protected]:jbw3/compiler.git
cd compiler
Build with cmake.
mkdir build
cd build
cmake ..\src -DLLVM_DIR="C:\Program Files (x86)\LLVM\lib\cmake"
cmake --build .