clang-wrapper: Guard against LD_LIBRARY_PATH.
This commit is contained in:
parent
e3f2e2e10b
commit
7c3f07f97c
|
@ -134,6 +134,12 @@ if test -n "$NIX_CLANG_WRAPPER_EXEC_HOOK"; then
|
||||||
source "$NIX_CLANG_WRAPPER_EXEC_HOOK"
|
source "$NIX_CLANG_WRAPPER_EXEC_HOOK"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# We nuke LD_LIBRARY_PATH here, because clang dynamically links to LLVM.
|
||||||
|
# Unfortunately, when such clang is used to build LLVM again, it can get in
|
||||||
|
# trouble temporarily binding to the build-directory versions of the libraries
|
||||||
|
# (the buildsystem sets LD_LIBRARY_PATH). That is very undesirable and can
|
||||||
|
# cause mysterious failures.
|
||||||
|
LD_LIBRARY_PATH=
|
||||||
|
|
||||||
# Call the real `clang'. Filter out warnings from stderr about unused
|
# Call the real `clang'. Filter out warnings from stderr about unused
|
||||||
# `-B' flags, since they confuse some programs. Deep bash magic to
|
# `-B' flags, since they confuse some programs. Deep bash magic to
|
||||||
|
|
Loading…
Reference in New Issue