rustc_wrapper: pass HOMEBREW_RUSTFLAGS last

If we pass it first, it can be overridden by other arguments passed on
the command line. We don't want that.

See discussion at Homebrew/homebrew-core#232566.
This commit is contained in:
Carlo Cabrera 2025-08-12 00:45:04 +08:00 committed by Carlo Cabrera
parent 04b47bc1aa
commit 63a8fd7a4a
No known key found for this signature in database
GPG Key ID: C74D447FC549A1D0

View File

@ -12,4 +12,4 @@ shift
# Prepend HOMEBREW_RUSTFLAGS to the arguments if set. # Prepend HOMEBREW_RUSTFLAGS to the arguments if set.
# HOMEBREW_RUSTFLAGS is set in extend/ENV/{std,super}.rb # HOMEBREW_RUSTFLAGS is set in extend/ENV/{std,super}.rb
# shellcheck disable=SC2086,SC2154 # shellcheck disable=SC2086,SC2154
exec "${RUSTC}" ${HOMEBREW_RUSTFLAGS} "$@" exec "${RUSTC}" "$@" ${HOMEBREW_RUSTFLAGS}