> ## Documentation Index
> Fetch the complete documentation index at: https://clickhouse.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# How to build LLVM and clang on Linux

> Commands to build LLVM and clang on Linux.

{frontMatter.description}

<h2 id="build-llvm-and-clang-on-linux">
  build LLVM and clang on Linux
</h2>

In order to build and contribute to ClickHouse, you must use [LLVM](https://llvm.org/) and [Clang](https://clang.llvm.org/).

These are the commands to build the latest version of LLVM and Clang on Linux:

```bash theme={null}
git clone git@github.com:llvm/llvm-project.git
mkdir llvm-build
cd llvm-build
cmake -GNinja -DCMAKE_BUILD_TYPE:STRING=Release -DLLVM_ENABLE_PROJECTS=all -DLLVM_TARGETS_TO_BUILD=all ../llvm-project/llvm
time ninja
sudo ninja install
```
