File tree Expand file tree Collapse file tree 1 file changed +31
-8
lines changed Expand file tree Collapse file tree 1 file changed +31
-8
lines changed Original file line number Diff line number Diff line change @@ -1001,15 +1001,38 @@ function generate_compiler_wrappers!(platform::AbstractPlatform; bin_path::Abstr
10011001 # <https://github.com/JuliaPackaging/Yggdrasil/pull/2962>.
10021002 xcrun_path = joinpath (bin_path, triplet (platform), " xcrun" )
10031003 write (xcrun_path, """
1004- #!/bin/bash
1005- if [[ "\$ {@}" == *"--show-sdk-path"* ]]; then
1006- echo /opt/$target /$target /sys-root
1007- elif [[ "\$ {@}" == *"--show-sdk-version"* ]]; then
1008- grep -A1 '<key>Version</key>' /opt/$target /$target /sys-root/SDKSettings.plist \
1004+ #!/bin/sh
1005+
1006+ sdk_path=/opt/\$ target/\$ target/sys-root
1007+
1008+ show_sdk_path() {
1009+ echo "\$ 1"
1010+ }
1011+
1012+ show_sdk_version() {
1013+ grep -A1 '<key>Version</key>' \$ 1/SDKSettings.plist \
10091014 | tail -n1 \
1010- | sed -E -e 's/\s *<string>([^<]+)<\/ string>\s */\1 /'
1011- else
1012- exec "\$ {@}"
1015+ | sed -E -e 's/\\ s*<string>([^<]+)<\\ /string>\\ s*/\\ 1/'
1016+ }
1017+
1018+ while [ \$ # -gt 0 ]; do
1019+ case "\$ 1" in
1020+ --show-sdk-path)
1021+ show_sdk_path \$ sdk_path
1022+ shift
1023+ ;;
1024+ --show-sdk-version)
1025+ show_sdk_version \$ sdk_path
1026+ shift
1027+ ;;
1028+ *)
1029+ break
1030+ ;;
1031+ esac
1032+ done
1033+
1034+ if [ \$ # -gt 0 ]; then
1035+ "\$ @"
10131036 fi
10141037 """ )
10151038 chmod (xcrun_path, 0o775 )
You can’t perform that action at this time.
0 commit comments