Created
February 25, 2026 20:37
-
-
Save tommymcm/1d1446869b7b9e43ff1b4303cc10c7be to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| BUILD_TYPE="$1" | |
| shift | |
| # Configure the build options. | |
| # TODO: make these options. | |
| PROJECTS="clang;lldb" | |
| TARGETS="X86;AArch64" | |
| # Get all the relevant directories. | |
| SRC_DIR="./llvm/" | |
| BUILD_DIR="./build/${BUILD_TYPE}" | |
| INSTALL_DIR="./install/${BUILD_TYPE}" | |
| # Create the build and install directories. | |
| mkdir -p ${BUILD_DIR} ${INSTALL_DIR} | |
| # Setup cmake. | |
| cmake -G Ninja \ | |
| -S "${SRC_DIR}" \ | |
| -B "${BUILD_DIR}" \ | |
| -DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \ | |
| -DCMAKE_BUILD_TYPE="${BUILD_TYPE}" \ | |
| -DLLVM_ENABLE_PROJECTS="${PROJECTS}" \ | |
| -DLLVM_TARGETS_TO_BUILD="${TARGETS}" \ | |
| $@ # pass along all extra arguments. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment