Merge remote-tracking branch 'upstream/master' into wrapper-pname-support
This commit is contained in:
@@ -33,6 +33,7 @@ fi
|
||||
# GCC prints annoying warnings when they are not needed.
|
||||
dontLink=0
|
||||
nonFlagArgs=0
|
||||
cc1=0
|
||||
# shellcheck disable=SC2193
|
||||
[[ "@prog@" = *++ ]] && isCpp=1 || isCpp=0
|
||||
cppInclude=1
|
||||
@@ -68,6 +69,8 @@ while (( "$n" < "$nParams" )); do
|
||||
elif [[ "$p" != -?* ]]; then
|
||||
# A dash alone signifies standard input; it is not a flag
|
||||
nonFlagArgs=1
|
||||
elif [ "$p" = -cc1 ]; then
|
||||
cc1=1
|
||||
fi
|
||||
n+=1
|
||||
done
|
||||
@@ -167,6 +170,14 @@ if [ "$*" = -v ]; then
|
||||
extraBefore=()
|
||||
fi
|
||||
|
||||
# clang's -cc1 mode is not compatible with most options
|
||||
# that we would pass. Rather than trying to pass only
|
||||
# options that would work, let's just remove all of them.
|
||||
if [ "$cc1" = 1 ]; then
|
||||
extraAfter=()
|
||||
extraBefore=()
|
||||
fi
|
||||
|
||||
# Optionally print debug info.
|
||||
if (( "${NIX_DEBUG:-0}" >= 1 )); then
|
||||
# Old bash workaround, see ld-wrapper for explanation.
|
||||
|
||||
@@ -134,8 +134,6 @@ stdenv.mkDerivation {
|
||||
|
||||
installPhase =
|
||||
''
|
||||
set -u
|
||||
|
||||
mkdir -p $out/bin $out/nix-support
|
||||
|
||||
wrap() {
|
||||
@@ -224,8 +222,6 @@ stdenv.mkDerivation {
|
||||
|
||||
postFixup =
|
||||
''
|
||||
set -u
|
||||
|
||||
# Backwards compatability for packages expecting this file, e.g. with
|
||||
# `$NIX_CC/nix-support/dynamic-linker`.
|
||||
#
|
||||
|
||||
@@ -54,8 +54,6 @@
|
||||
# For more details, read the individual files where the mechanisms used to
|
||||
# accomplish this will be individually documented.
|
||||
|
||||
set -u
|
||||
|
||||
# Skip setup hook if we're neither a build-time dep, nor, temporarily, doing a
|
||||
# native compile.
|
||||
#
|
||||
@@ -120,4 +118,3 @@ export NIX_HARDENING_ENABLE
|
||||
|
||||
# No local scope in sourced file
|
||||
unset -v role_pre role_post
|
||||
set +u
|
||||
|
||||
Reference in New Issue
Block a user