shims/super/cc: preserve LD_LIBRARY_PATH

This could be used by the linker [^1] so let's preserve it before
invoking the compiler/linker.

[^1]: https://sourceware.org/binutils/docs/ld/Options.html
This commit is contained in:
Ruoyu Zhong 2024-08-26 00:18:15 +08:00
parent 86de678086
commit fb57604fe2
No known key found for this signature in database

View File

@ -5,6 +5,7 @@ then
echo "${0##*/}: The build tool has reset ENV; --env=std required." >&2
exit 1
fi
export HOMEBREW_LD_LIBRARY_PATH="${LD_LIBRARY_PATH}"
unset LD_LIBRARY_PATH
unset RUBYLIB
exec "${HOMEBREW_RUBY_PATH}" --enable-frozen-string-literal --disable=gems,did_you_mean,rubyopt -x "$0" "$@"
@ -520,6 +521,8 @@ if __FILE__ == $PROGRAM_NAME
ENV["HOMEBREW_CC"] = "clang"
end
ENV["LD_LIBRARY_PATH"] = ENV["HOMEBREW_LD_LIBRARY_PATH"]
####################################################################### main
dirname, basename = File.split($PROGRAM_NAME)