Skip to content

Instantly share code, notes, and snippets.

@0xalpharush
Last active October 19, 2023 03:04
Show Gist options
  • Save 0xalpharush/4ca82f998263bcb3969b8caf816daccd to your computer and use it in GitHub Desktop.
Save 0xalpharush/4ca82f998263bcb3969b8caf816daccd to your computer and use it in GitHub Desktop.
Configuring llvm

Using LLVM from brew installation instead of XCode

PATH="/opt/homebrew/opt/llvm/bin${PATH:+:${PATH}}"; export PATH;

It should return something like:

$clang --version                           
Homebrew clang version 16.0.6
Target: arm64-apple-darwin22.6.0
Thread model: posix
InstalledDir: /opt/homebrew/opt/llvm/bin

Installing a specifc version of LLVM with brew

brew install llvm@{version} For llvm-sys library, it can be configured using environment variable like:

export LLVM_SYS_120_PREFIX=/opt/homebrew/opt/llvm@12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment