Skip to content

Instantly share code, notes, and snippets.

@ioncodes
Last active November 14, 2021 11:17
Show Gist options
  • Save ioncodes/97a34e311736ef960c1bd825b49f3f0f to your computer and use it in GitHub Desktop.
Save ioncodes/97a34e311736ef960c1bd825b49f3f0f to your computer and use it in GitHub Desktop.
Using inkwell
git clone https://github.com/llvm/llvm-project
# checkout version/commit to use
cd llvm-project
mkdir build
cd build
# append -DCMAKE_BUILD_TYPE=Release to next command to enable Release build
cmake .. -GNinja # non-Windows
cmake .. # Windows, or specify Visual Studio generator
cmake --build .
# append bin folder to PATH for Windows
# for other OS set $LLVM_SYS_{$VERSION}_PREFIX to your build folder
# now you can cargo build in source

# to make a seperate folder with the files needed:
# 1. copy bin & lib folder
# 2. copy llvm-project/llvm/include/{llvm & llvm-c} to a new include folder
# 3. copy build/include/llvm/Config folder to include/llvm/Config (this is needed for llvm-config.h)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment