mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
cc-wrapper: Hardcode path to mktemp
and rm
if possible (#349589)
This commit is contained in:
commit
22feb8f7ca
@ -251,8 +251,8 @@ if [[ -e @out@/nix-support/cc-wrapper-hook ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if (( "${NIX_CC_USE_RESPONSE_FILE:-@use_response_file_by_default@}" >= 1 )); then
|
if (( "${NIX_CC_USE_RESPONSE_FILE:-@use_response_file_by_default@}" >= 1 )); then
|
||||||
responseFile=$(mktemp "${TMPDIR:-/tmp}/cc-params.XXXXXX")
|
responseFile=$(@mktemp@ "${TMPDIR:-/tmp}/cc-params.XXXXXX")
|
||||||
trap 'rm -f -- "$responseFile"' EXIT
|
trap '@rm@ -f -- "$responseFile"' EXIT
|
||||||
printf "%q\n" \
|
printf "%q\n" \
|
||||||
${extraBefore+"${extraBefore[@]}"} \
|
${extraBefore+"${extraBefore[@]}"} \
|
||||||
${params+"${params[@]}"} \
|
${params+"${params[@]}"} \
|
||||||
|
@ -743,6 +743,8 @@ stdenvNoCC.mkDerivation {
|
|||||||
# TODO(@sternenseemann): rename env var via stdenv rebuild
|
# TODO(@sternenseemann): rename env var via stdenv rebuild
|
||||||
shell = getBin runtimeShell + runtimeShell.shellPath or "";
|
shell = getBin runtimeShell + runtimeShell.shellPath or "";
|
||||||
gnugrep_bin = optionalString (!nativeTools) gnugrep;
|
gnugrep_bin = optionalString (!nativeTools) gnugrep;
|
||||||
|
rm = if nativeTools then "rm" else lib.getExe' coreutils "rm";
|
||||||
|
mktemp = if nativeTools then "mktemp" else lib.getExe' coreutils "mktemp";
|
||||||
# stdenv.cc.cc should not be null and we have nothing better for now.
|
# stdenv.cc.cc should not be null and we have nothing better for now.
|
||||||
# if the native impure bootstrap is gotten rid of this can become `inherit cc;` again.
|
# if the native impure bootstrap is gotten rid of this can become `inherit cc;` again.
|
||||||
cc = optionalString (!nativeTools) cc;
|
cc = optionalString (!nativeTools) cc;
|
||||||
|
@ -131,6 +131,9 @@ in stdenv.mkDerivation {
|
|||||||
ASAN_OPTIONS=use_sigaltstack=0 ${emulator} ./sanitizers
|
ASAN_OPTIONS=use_sigaltstack=0 ${emulator} ./sanitizers
|
||||||
''}
|
''}
|
||||||
|
|
||||||
|
echo "Check whether CC with NIX_CC_USE_RESPONSE_FILE hardcodes all required binaries..." >&2
|
||||||
|
NIX_CC_USE_RESPONSE_FILE=1 ${CC} -v
|
||||||
|
|
||||||
touch $out
|
touch $out
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user