rust/compiler/rustc_codegen_cranelift/src
bors 97f2698484 Auto merge of #88363 - michaelwoerister:remapped-diagnostics, r=estebank
Path remapping: Make behavior of diagnostics output dependent on presence of --remap-path-prefix.

This PR fixes a regression (#87745) with `--remap-path-prefix` where the flag stopped causing diagnostic messages to be remapped as well. The regression was introduced in https://github.com/rust-lang/rust/pull/83813 where we erroneously assumed that remapping of diagnostic messages was not desired anymore (because #70642 partially undid that functionality with nobody objecting).

The issue is fixed by making `--remap-path-prefix` remap diagnostic messages again, including for paths that have been remapped in upstream crates (e.g. the standard library). This means that "sysroot-localization" (implemented in #70642) is also disabled if `rustc` is invoked with `--remap-path-prefix`. The assumption is that once someone starts explicitly remapping paths they also don't want paths to their local Rust installation in their build output.

In the future we might want to give more fine-grained control over this behavior via compiler flags (see https://github.com/rust-lang/rfcs/pull/3127 for a related RFC). For now this PR is intended as a regression fix.

This PR is an alternative to https://github.com/rust-lang/rust/pull/88191, which makes diagnostic messages be remapped unconditionally. That approach, however, would effectively revert #70642.

Fixes https://github.com/rust-lang/rust/issues/87745.

cc `@cbeuw`
r? `@ghost`
2021-09-03 00:23:10 +00:00
..
abi Merge commit '05677b6bd6' into sync_cg_clif-2021-08-06 2021-08-06 16:26:56 +02:00
bin Merge commit '3a31c6d827' into sync_cg_clif-2021-07-07 2021-07-07 11:14:20 +02:00
debuginfo Auto merge of #88363 - michaelwoerister:remapped-diagnostics, r=estebank 2021-09-03 00:23:10 +00:00
driver Use in_incr_comp_dir_sess in cg_clif 2021-09-02 12:29:12 +02:00
intrinsics rustc_target: TyAndLayout::field should never error. 2021-08-30 00:44:09 +03:00
optimize Merge commit '05677b6bd6' into sync_cg_clif-2021-08-06 2021-08-06 16:26:56 +02:00
allocator.rs Merge commit '05677b6bd6' into sync_cg_clif-2021-08-06 2021-08-06 16:26:56 +02:00
analyze.rs Merge commit '05677b6bd6' into sync_cg_clif-2021-08-06 2021-08-06 16:26:56 +02:00
archive.rs Add first cut of functionality for #58713: support for #[link(kind = "raw-dylib")]. 2021-06-04 18:01:35 -07:00
backend.rs Sync rustc_codegen_cranelift 'ddd4ce2553' 2021-04-30 14:49:58 +02:00
base.rs Merge commit '05677b6bd6' into sync_cg_clif-2021-08-06 2021-08-06 16:26:56 +02:00
cast.rs Merge commit '05677b6bd6' into sync_cg_clif-2021-08-06 2021-08-06 16:26:56 +02:00
codegen_i128.rs Merge commit '05677b6bd6' into sync_cg_clif-2021-08-06 2021-08-06 16:26:56 +02:00
common.rs rustc_target: add lifetime parameter to LayoutOf. 2021-08-27 13:09:32 +03:00
compiler_builtins.rs Use the now available implementation of IntoIterator for arrays 2021-06-14 23:40:09 +02:00
config.rs Merge commit '40dd3e2b70' into sync_cg_clif-2021-05-27 2021-05-27 13:08:14 +02:00
constant.rs make unevaluated const substs optional 2021-08-26 11:00:30 +02:00
discriminant.rs Merge commit '9a0c32934e' into sync_cg_clif-2021-03-05 2021-03-05 19:12:59 +01:00
inline_asm.rs Merge commit '40dd3e2b70' into sync_cg_clif-2021-05-27 2021-05-27 13:08:14 +02:00
lib.rs Path remapping: Make behavior of diagnostics output dependent on presence of --remap-path-prefix. 2021-08-27 11:50:44 +02:00
linkage.rs Sync rustc_codegen_cranelift 'ddd4ce2553' 2021-04-30 14:49:58 +02:00
main_shim.rs Merge commit '40dd3e2b70' into sync_cg_clif-2021-05-27 2021-05-27 13:08:14 +02:00
metadata.rs Drop metadata_encoding_version. 2021-06-01 21:12:27 +02:00
num.rs Merge commit '05677b6bd6' into sync_cg_clif-2021-08-06 2021-08-06 16:26:56 +02:00
pointer.rs Merge commit '0969bc6dde' into sync_cg_clif-2021-03-29 2021-03-29 10:45:09 +02:00
pretty_clif.rs Merge commit '3a31c6d827' into sync_cg_clif-2021-07-07 2021-07-07 11:14:20 +02:00
toolchain.rs Unify duplicate linker_and_flavor methods in rustc_codegen_{cranelift,ssa}. 2021-06-05 21:59:41 -07:00
trap.rs Merge commit '05677b6bd6' into sync_cg_clif-2021-08-06 2021-08-06 16:26:56 +02:00
unsize.rs Fold vtable_trait_upcasting_coercion_new_vptr_slot logic into obligation processing. 2021-08-18 13:00:27 +08:00
value_and_place.rs Merge commit '05677b6bd6' into sync_cg_clif-2021-08-06 2021-08-06 16:26:56 +02:00
vtable.rs Merge commit '05677b6bd6' into sync_cg_clif-2021-08-06 2021-08-06 16:26:56 +02:00