Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shims/super/cc: unset LD_LIBRARY_PATH #18162

Merged
merged 3 commits into from
Aug 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Library/Homebrew/shims/super/cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ then
echo "${0##*/}: The build tool has reset ENV; --env=std required." >&2
exit 1
fi
unset HOMEBREW_LD_LIBRARY_PATH
if [[ -n "${LD_LIBRARY_PATH+set}" ]]
then
export HOMEBREW_LD_LIBRARY_PATH="${LD_LIBRARY_PATH}"
fi
unset LD_LIBRARY_PATH
unset RUBYLIB
exec "${HOMEBREW_RUBY_PATH}" --enable-frozen-string-literal --disable=gems,did_you_mean,rubyopt -x "$0" "$@"
#!/usr/bin/env ruby -W0
Expand Down Expand Up @@ -519,6 +525,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)
Expand Down