Merge bitcoin/bitcoin#24520: guix: only check for the macOS SDK once

e8023100be guix: only check for the macOS SDK once (fanquake)

Pull request description:

  If we are building for both macOS HOSTS, there's no need to check and
  print that the SDK exists two times.

  Currently a Guix build for both HOSTS will print:
  ```bash
  ./contrib/guix/guix-build
  Found macOS SDK at '/SDKs/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers', using...
  Found macOS SDK at '/SDKs/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers', using...
  Checking that we can connect to the guix-daemon...
  ```

ACKs for top commit:
  laanwj:
    Code review ACK e8023100be
  achow101:
    ACK e8023100be

Tree-SHA512: 7e9ee7793c5dc1eb485806ca3d613742397d2cc62525203a168cad1ec96aabfd4e63dc3f2e8d205bdb2f3c2079f731d75c5d162d55ff0d42a7e6f3d01d3a7db1
This commit is contained in:
Andrew Chow 2022-03-10 06:30:46 -05:00
commit d1a940f729
No known key found for this signature in database
GPG key ID: 17565732E08E5E41

View file

@ -121,7 +121,7 @@ else
fi
################
# When building for darwin, the macOS SDK should exists
# When building for darwin, the macOS SDK should exist
################
for host in $HOSTS; do
@ -130,6 +130,7 @@ for host in $HOSTS; do
OSX_SDK="$(make -C "${PWD}/depends" --no-print-directory HOST="$host" print-OSX_SDK | sed 's@^[^=]\+=@@g')"
if [ -e "$OSX_SDK" ]; then
echo "Found macOS SDK at '${OSX_SDK}', using..."
break
else
echo "macOS SDK does not exist at '${OSX_SDK}', please place the extracted, untarred SDK there to perform darwin builds, exiting..."
exit 1