Add sample CMake invocation to README.md

This commit is contained in:
Sam Vervaeck 2024-01-21 00:20:04 +01:00
parent 4e11af005c
commit 4ab4094acc
Signed by: samvv
SSH key fingerprint: SHA256:dIg0ywU1OP+ZYifrYxy8c5esO72cIKB+4/9wkZj1VaY

View file

@ -4,10 +4,23 @@ This directory contains a partial implementation of the Bolt programming
language using C++ and LLVM. It currently is one of the main contenders of language using C++ and LLVM. It currently is one of the main contenders of
becoming the offical Bolt compiler. becoming the offical Bolt compiler.
## Developing ## Developing
You need a recent version of the Zen libries to be able to compile. If youu You need a recent version of the Zen libries to be able to compile. If youu
still get build errors, the Zen libraries might be out of date. Do not hesitate still get build errors, the Zen libraries might be out of date. Do not hesitate
to file an issue! to file an issue!
This is how a potential invocation to CMake could look like:
```sh
cmake \
-DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-G Ninja \
-B build \
-DBOLT_ENABLE_TESTS=1 \
-DZEN_ENABLE_TESTS=0 \
-DLLVM_TARGETS_TO_BUILD=host \
-DLLVM_OPTIMIZED_TABLEGEN=ON
```