cc-wrapper: ensure that $PATH is exported

After #400734 we modify gcc's $PATH in add-flags.sh which means that
we now need to export it if it was not set originally, otherwise gcc's
environment will not include the modification.
This commit is contained in:
Peter Collingbourne
2025-05-25 12:32:46 +02:00
committed by Alyssa Ross
parent e856cf374e
commit da136a6f42
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -249,7 +249,7 @@ if (( "${NIX_DEBUG:-0}" >= 1 )); then
printf " %q\n" ${extraAfter+"${extraAfter[@]}"} >&2
fi
PATH="$path_backup"
export PATH="$path_backup"
# Old bash workaround, see above.
if (( "${NIX_CC_USE_RESPONSE_FILE:-@use_response_file_by_default@}" >= 1 )); then
@@ -174,7 +174,7 @@ if (( "${NIX_DEBUG:-0}" >= 1 )); then
printf " %q\n" ${extraAfter+"${extraAfter[@]}"} >&2
fi
PATH="$path_backup"
export PATH="$path_backup"
# Old bash workaround, see above.
exec @prog@ \
${extraBefore+"${extraBefore[@]}"} \