Skip to content

Instantly share code, notes, and snippets.

@AWeirdDev
Created June 4, 2026 13:20
Show Gist options
  • Select an option

  • Save AWeirdDev/a8c9ff3bad75b9c611bddd8b2c5b74f5 to your computer and use it in GitHub Desktop.

Select an option

Save AWeirdDev/a8c9ff3bad75b9c611bddd8b2c5b74f5 to your computer and use it in GitHub Desktop.
Install and build LLVM on your machine.

Install & Build LLVM for Shared Libraries

Fuck llvmenv. It's fucking old.

Download the llvm-project archive from LLVM Releases then extract it.

tar -xf ./llvm-project.tar.xz  # the file name
cd llvm-project

Be sure you have cc & ninja installed.

cmake -G Ninja -S ./llvm \
  -B ./build-llvm \  # the build directory
  -DCMAKE_BUILD_TYPE=Release \
  -DLLVM_BUILD_LLVM_DYLIB=ON \
  -DBUILD_SHARED_LIBS=OFF \
  -DLLVM_LINK_LLVM_DYLIB=ON \
  -DCMAKE_INSTALL_PREFIX=/opt/llvm  # where to install
 
cmake \
  --build ./build-llvm \  # the build directory
  --target install

Then son 😭 enjoy your fucking llvm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment