Skip to content

Commit 7e67c4d

Browse files
committed
Fix Metal toolchain resoultion
Signed-off-by: Adin Cebic <[email protected]>
1 parent aa57d46 commit 7e67c4d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

xcodeproj/internal/templates/bazel_build.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,14 @@ if [[ -n "${TOOLCHAINS-}" ]]; then
103103
fi
104104
fi
105105

106+
# Get Xcode major version
107+
xcode_major_version=$(xcodebuild -version | head -n 1 | sed 's/Xcode //' | cut -d. -f1)
108+
109+
# We unset Metal toolchains since Xcode 26+ complains when that's passed as action_env
110+
if [[ "$xcode_major_version" -ge 26 && "${toolchain:-}" == *"com.apple.dt.toolchain.Metal"* ]]; then
111+
unset toolchain
112+
fi
113+
106114
# Build
107115

108116
echo "Starting Bazel build"

0 commit comments

Comments
 (0)