diff options
| author | bors <bors@rust-lang.org> | 2024-03-29 14:00:21 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-03-29 14:00:21 +0000 |
| commit | 685927aae69657b46323cffbeb0062835bd7fa2b (patch) | |
| tree | 48a5a2694795c9a904f17f9cc0b2553bccb0ab95 /compiler/rustc_codegen_llvm/src/coverageinfo | |
| parent | 45796d1c24445b298567752519471cef2cff3298 (diff) | |
| parent | fefb8f1f9cb830e1ca0b0ba449db7c8e7d4ff7ba (diff) | |
| download | rust-685927aae69657b46323cffbeb0062835bd7fa2b.tar.gz rust-685927aae69657b46323cffbeb0062835bd7fa2b.zip | |
Auto merge of #122450 - Urgau:simplify-trim-paths-feature, r=michaelwoerister
Simplify trim-paths feature by merging all debuginfo options together This PR simplifies the trim-paths feature by merging all debuginfo options together, as described in https://github.com/rust-lang/rust/issues/111540#issuecomment-1994010274. And also do some correctness fixes found during the review. cc `@weihanglo` r? `@michaelwoerister`
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/coverageinfo')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/coverageinfo/mapgen.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_llvm/src/coverageinfo/mapgen.rs b/compiler/rustc_codegen_llvm/src/coverageinfo/mapgen.rs index 0fbc624389b..278db21b0a1 100644 --- a/compiler/rustc_codegen_llvm/src/coverageinfo/mapgen.rs +++ b/compiler/rustc_codegen_llvm/src/coverageinfo/mapgen.rs @@ -173,8 +173,14 @@ impl GlobalFileTable { // Since rustc generates coverage maps with relative paths, the // compilation directory can be combined with the relative paths // to get absolute paths, if needed. + use rustc_session::config::RemapPathScopeComponents; use rustc_session::RemapFileNameExt; - let working_dir: &str = &tcx.sess.opts.working_dir.for_codegen(tcx.sess).to_string_lossy(); + let working_dir: &str = &tcx + .sess + .opts + .working_dir + .for_scope(tcx.sess, RemapPathScopeComponents::MACRO) + .to_string_lossy(); llvm::build_byte_buffer(|buffer| { coverageinfo::write_filenames_section_to_buffer( |
