Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix duplicate directory separator in --remap-path-prefix. #96562

Merged
merged 1 commit into from
Apr 30, 2022

Conversation

michaelwoerister
Copy link
Member

The compiler will currently emit duplicate directory separators when --remap-path-prefix has an exact match of the working directory and it is invoked with a relative path to the main source file. For example

rustc src/main.rs -Cdebuginfo=2 --remap-path-prefix="$(pwd)=abc"

will produce the path abc//src/main.rs in debuginfo. This is because some_path.join("") will append a directory separator to some_path and then LLVM does not check if the working directory already ends a directory separator before concatenating it with the relative path.

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Apr 29, 2022
@rust-highfive
Copy link
Collaborator

r? @oli-obk

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 29, 2022
@oli-obk
Copy link
Contributor

oli-obk commented Apr 29, 2022

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Apr 29, 2022

📌 Commit 3614bd3 has been approved by oli-obk

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 29, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 29, 2022
Rollup of 6 pull requests

Successful merges:

 - rust-lang#96390 (Switch JS code to ES6 - part 2)
 - rust-lang#96527 (RustWrapper: explicitly don't handle DXILPointerTyID)
 - rust-lang#96536 (rustdoc: fix missing method list for primitive deref target)
 - rust-lang#96559 (Use the correct lifetime binder for elided lifetimes in path.)
 - rust-lang#96560 (Remove unnecessary environment variable in cf-protection documentation)
 - rust-lang#96562 (Fix duplicate directory separator in --remap-path-prefix.)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 548fca6 into rust-lang:master Apr 30, 2022
@rustbot rustbot added this to the 1.62.0 milestone Apr 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants