Last active
June 19, 2022 16:39
-
-
Save Birch-san/f647b5debbe856c1350af9e1191ab351 to your computer and use it in GitHub Desktop.
Compiling IREE from source on macOS
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
# https://google.github.io/iree/building-from-source/getting-started/#reference-pages | |
# https://github.com/google/iree/blob/main/docs/developers/get_started/cmake_options_and_variables.md | |
git clone --branch scatter --depth 1 https://github.com/Birch-san/iree.git | |
git submodule update --init | |
cd iree | |
pip install pybind11 | |
export CMAKE_OSX_ARCHITECTURES="arm64" | |
export MACOSX_DEPLOYMENT_TARGET=11.0 | |
export IREE_ENABLE_CPUINFO=OFF | |
export IREE_HAL_DRIVER_VULKAN=ON | |
export IREE_ENABLE_RUNTIME_TRACING=ON | |
export IREE_RUNTIME_CUSTOM_PACKAGE_SUFFIX="-instrumented" | |
cmake -GNinja -B ../iree-build/ -S . \ | |
-DCMAKE_BUILD_TYPE=RelWithDebInfo \ | |
-DIREE_ENABLE_ASSERTIONS=ON \ | |
-DCMAKE_C_COMPILER=clang \ | |
-DCMAKE_CXX_COMPILER=clang++ \ | |
-DIREE_ENABLE_LLD=OFF \ | |
-DIREE_BUILD_PYTHON_BINDINGS=ON \ | |
-DIREE_BUILD_COMPILER=ON \ | |
-DIREE_BUILD_TESTS=OFF \ | |
-DIREE_BUILD_SAMPLES=OFF \ | |
-DCMAKE_C_COMPILER_LAUNCHER=ccache \ | |
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ | |
-DIREE_HAL_DRIVER_VULKAN=ON \ | |
-DIREE_ENABLE_RUNTIME_TRACING=ON \ | |
-DIREE_ENABLE_CPUINFO=off \ | |
-DCMAKE_OSX_ARCHITECTURES="arm64" | |
cmake --build ../iree-build/ | |
cmake --install ../iree-build/ --prefix ../iree-install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment