Skip to content

Commit 8dbf18c

Browse files
committed
guix: Check for macOS SDK before building anything
1 parent 34b23f5 commit 8dbf18c

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

contrib/guix/guix-build.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,24 @@ else
110110
mkdir -p "$DISTSRC_BASE"
111111
fi
112112

113+
################
114+
# Check 5: When building for darwin, make sure that the macOS SDK exists
115+
################
116+
117+
for host in $HOSTS; do
118+
case "$host" in
119+
*darwin*)
120+
OSX_SDK="$(make -C "${PWD}/depends" --no-print-directory HOST="$host" print-OSX_SDK | sed 's@^[^=]\+=[[:space:]]\+@@g')"
121+
if [ -e "$OSX_SDK" ]; then
122+
echo "Found macOS SDK at '${OSX_SDK}', using..."
123+
else
124+
echo "macOS SDK does not exist at '${OSX_SDK}', please place the extracted, untarred SDK there to perform darwin builds, exiting..."
125+
exit 1
126+
fi
127+
;;
128+
esac
129+
done
130+
113131
#########
114132
# Setup #
115133
#########

0 commit comments

Comments
 (0)