{bintools-wrapper,cc-wrapper}: export Darwin SDK variables (#351718)

This commit is contained in:
Emily
2024-10-29 02:15:16 +00:00
committed by GitHub
@@ -8,9 +8,9 @@ if [[ "@darwinMinVersion@" ]]; then
# Allow wrapped compilers to do something useful when no `DEVELOPER_DIR` is set, which can happen when
# the compiler is run outside of a stdenv or intentionally in an environment with no environment variables set.
DEVELOPER_DIR=${DEVELOPER_DIR_@suffixSalt@:-@fallback_sdk@}
export DEVELOPER_DIR=${DEVELOPER_DIR_@suffixSalt@:-@fallback_sdk@}
# xcbuild needs `SDKROOT` to be the name of the SDK, which it sets in its own wrapper,
# but compilers expect it to point to the absolute path.
SDKROOT="$DEVELOPER_DIR/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk"
export SDKROOT="$DEVELOPER_DIR/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk"
fi