brew/Library/Homebrew/shims/super/rustc_wrapper

16 lines
525 B
Plaintext
Raw Normal View History

#!/bin/bash
# Prepend HOMEBREW_RUSTFLAGS to rustc arguments if set.
# This allows Homebrew to pass optimization flags while still respecting
# .cargo/config.toml (which sets RUSTFLAGS).
# rustc is passed as the first argument to RUSTC_WRAPPER
# https://doc.rust-lang.org/cargo/reference/environment-variables.html
RUSTC="${1}"
shift
# Prepend HOMEBREW_RUSTFLAGS to the arguments if set.
# HOMEBREW_RUSTFLAGS is set in extend/ENV/{std,super}.rb
# shellcheck disable=SC2086,SC2154
exec "${RUSTC}" ${HOMEBREW_RUSTFLAGS} "$@"