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 @@ -997,15 +997,38 @@ function generate_compiler_wrappers!(platform::AbstractPlatform; bin_path::Abstr
997997 # <https://github.com/JuliaPackaging/Yggdrasil/pull/2962>.
998998 xcrun_path = joinpath (bin_path, triplet (platform), " xcrun" )
999999 write (xcrun_path, """
1000- #!/bin/bash
1001- if [[ "\$ {@}" == *"--show-sdk-path"* ]]; then
1002- echo /opt/$target /$target /sys-root
1003- elif [[ "\$ {@}" == *"--show-sdk-version"* ]]; then
1004- grep -A1 '<key>Version</key>' /opt/$target /$target /sys-root/SDKSettings.plist \
1000+ #!/bin/sh
1001+
1002+ sdk_path=/opt/\$ target/\$ target/sys-root
1003+
1004+ show_sdk_path() {
1005+ echo "\$ 1"
1006+ }
1007+
1008+ show_sdk_version() {
1009+ grep -A1 '<key>Version</key>' \$ 1/SDKSettings.plist \
10051010 | tail -n1 \
1006- | sed -E -e 's/\s *<string>([^<]+)<\/ string>\s */\1 /'
1007- else
1008- exec "\$ {@}"
1011+ | sed -E -e 's/\\ s*<string>([^<]+)<\\ /string>\\ s*/\\ 1/'
1012+ }
1013+
1014+ while [ \$ # -gt 0 ]; do
1015+ case "\$ 1" in
1016+ --show-sdk-path)
1017+ show_sdk_path \$ sdk_path
1018+ shift
1019+ ;;
1020+ --show-sdk-version)
1021+ show_sdk_version \$ sdk_path
1022+ shift
1023+ ;;
1024+ *)
1025+ break
1026+ ;;
1027+ esac
1028+ done
1029+
1030+ if [ \$ # -gt 0 ]; then
1031+ "\$ @"
10091032 fi
10101033 """ )
10111034 chmod (xcrun_path, 0o775 )
You can’t perform that action at this time.
0 commit comments