Merge pull request #258608 from aherrmann/macos-mktemp

MacOS compatible mktemp in cc-wrapper
This commit is contained in:
Artturi 2023-10-08 11:38:14 +03:00 committed by GitHub
commit 187f681cb4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -246,7 +246,7 @@ if [[ -e @out@/nix-support/cc-wrapper-hook ]]; then
fi
if (( "${NIX_CC_USE_RESPONSE_FILE:-@use_response_file_by_default@}" >= 1 )); then
responseFile=$(mktemp --tmpdir cc-params.XXXXXX)
responseFile=$(mktemp "${TMPDIR:-/tmp}/cc-params.XXXXXX")
trap 'rm -f -- "$responseFile"' EXIT
printf "%q\n" \
${extraBefore+"${extraBefore[@]}"} \