Disable Vulkan driver in macOS runtime packages. (#18324)
Rather than use custom logic in the release package build, this falls
back to using the base CMake logic that disables Vulkan in favor of
Metal on Apple platforms:
https://github.com/iree-org/iree/blob/8e42839893f40788357e38b2856ca5930cb4b47b/CMakeLists.txt#L267-L272
This should fix the `macos :: Build py-runtime-pkg` nightly release
build, which started failing a few weeks ago
* Latest failing logs:
https://github.com/iree-org/iree/actions/runs/10506137072/job/29105159765
```
ld: building fixups: pointer not aligned at
__ZN4iree3hal6vulkan12_GLOBAL__N_124kDynamicFunctionPtrInfosE+0xC from
/tmp/lto.o
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
```
* Test logs with this PR on my fork:
https://github.com/ScottTodd/iree/actions/runs/10513089016/job/29127873585
diff --git a/build_tools/python_deploy/build_macos_packages.sh b/build_tools/python_deploy/build_macos_packages.sh
index c6c3807..e0d77ac 100755
--- a/build_tools/python_deploy/build_macos_packages.sh
+++ b/build_tools/python_deploy/build_macos_packages.sh
@@ -72,9 +72,7 @@
}
function build_iree_runtime() {
- # TODO(antiagainst): remove Vulkan once IREE_HAL_DRIVER_METAL is stable
export IREE_RUNTIME_BUILD_TRACY=ON
- IREE_HAL_DRIVER_VULKAN=ON \
python3 -m pip wheel -v -w $output_dir $repo_root/runtime/
}
diff --git a/runtime/setup.py b/runtime/setup.py
index ffeab7a..d14a3e3 100644
--- a/runtime/setup.py
+++ b/runtime/setup.py
@@ -275,10 +275,6 @@
"-DIREE_BUILD_TESTS=OFF",
"-DPython3_EXECUTABLE={}".format(sys.executable),
"-DCMAKE_BUILD_TYPE={}".format(cfg),
- get_env_cmake_option(
- "IREE_HAL_DRIVER_VULKAN",
- "OFF" if platform.system() == "Darwin" else "ON",
- ),
get_env_cmake_list("IREE_EXTERNAL_HAL_DRIVERS", ""),
get_env_cmake_option("IREE_ENABLE_CPUINFO", "ON"),
] + list(extra_cmake_args)