File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed
xcodeproj/internal/templates Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -97,9 +97,20 @@ readonly base_pre_config_flags=(
9797# Custom Swift toolchains
9898
9999if [[ -n " ${TOOLCHAINS-} " ]]; then
100- toolchain=" ${TOOLCHAINS%% * } "
101- if [[ " $toolchain " == " com.apple.dt.toolchain.XcodeDefault" ]]; then
102- unset toolchain
100+ # We remove all Metal toolchains from the list first
101+ toolchains_array=($TOOLCHAINS )
102+ filtered_toolchains=()
103+ for tc in " ${toolchains_array[@]} " ; do
104+ if [[ " $tc " != " com.apple.dt.toolchain.Metal" * ]]; then
105+ filtered_toolchains+=(" $tc " )
106+ fi
107+ done
108+
109+ if [[ ${# filtered_toolchains[@]} -gt 0 ]]; then
110+ toolchain=" ${filtered_toolchains[0]} "
111+ if [[ " $toolchain " == " com.apple.dt.toolchain.XcodeDefault" ]]; then
112+ unset toolchain
113+ fi
103114 fi
104115fi
105116
You can’t perform that action at this time.
0 commit comments