Rollup merge of #135330 - bjorn3:respect_sysroot_in_version_printing, r=lqd
Respect --sysroot for rustc -vV and -Cpasses=list This is necessary when the specified codegen backend is in a custom sysroot. Fixes https://github.com/rust-lang/rust/issues/135165
This commit is contained in:
commit
c8c5fa4893
4 changed files with 31 additions and 19 deletions
|
@ -1346,8 +1346,12 @@ pub fn build_configuration(sess: &Session, mut user_cfg: Cfg) -> Cfg {
|
|||
user_cfg
|
||||
}
|
||||
|
||||
pub fn build_target_config(early_dcx: &EarlyDiagCtxt, opts: &Options, sysroot: &Path) -> Target {
|
||||
match Target::search(&opts.target_triple, sysroot) {
|
||||
pub fn build_target_config(
|
||||
early_dcx: &EarlyDiagCtxt,
|
||||
target: &TargetTuple,
|
||||
sysroot: &Path,
|
||||
) -> Target {
|
||||
match Target::search(target, sysroot) {
|
||||
Ok((target, warnings)) => {
|
||||
for warning in warnings.warning_messages() {
|
||||
early_dcx.early_warn(warning)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue