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: remove unused sysroot_host_libdir #13468

Merged
merged 1 commit into from Feb 21, 2024

Conversation

weihanglo
Copy link
Member

What does this PR try to resolve?

Copy from #10469 (comment):

I've never been entirely clear why it does this. #4006 didn't really
explain why it added the corresponding host_dylib_path. I can't envision
a scenario where it matters. I think compiler plugins and proc-macros
should load just fine, since libstd.so should already be loaded by the
compiler. Also, rustc uses rpath these days, and on Windows libstd.so is
placed in the bin directory which will be searched first anyways.

On balance, I think it should be safe to just remove sysroot_host_libdir.
I can't come up with a scenario where it matters, at least on
windows/macos/linux. One issue is that this is most likely to affect
plugins, but those are deprecated and I think only Servo was the real
holdout. A concern is that nobody is going to test this use case before
it hits stable.

Also,

So should generally be fine.

How should we test and review this PR?

There might be some edge case like #7798 passing --sysroot, though I would also expect rustc to load sysroot from provided path. Hence safe?

Additional information

@rustbot
Copy link
Collaborator

rustbot commented Feb 20, 2024

r? @ehuss

rustbot has assigned @ehuss.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added A-build-execution Area: anything dealing with executing the compiler A-cfg-expr Area: Platform cfg expressions S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 20, 2024
@weihanglo weihanglo changed the title refactor: remove unused sysroot_host_libdir fix: remove unused sysroot_host_libdir Feb 20, 2024
Copy from <rust-lang#10469 (comment)>:

> I've never been entirely clear why it does this. rust-lang#4006 didn't really
> explain why it added the corresponding host_dylib_path. I can't envision
> a scenario where it matters. I think compiler plugins and proc-macros
> should load just fine, since libstd.so should already be loaded by the
> compiler. Also, rustc uses rpath these days, and on Windows libstd.so is
> placed in the bin directory which will be searched first anyways.
>
> On balance, I think it should be safe to just remove sysroot_host_libdir.
> I can't come up with a scenario where it matters, at least on
> windows/macos/linux. One issue is that this is most likely to affect
> plugins, but those are deprecated and I think only Servo was the real
> holdout. A concern is that nobody is going to test this use case before
> it hits stable.

Also,

* compiler plugins were removed rust-lang/rust#116412
* servo has moved off from plugins: servo/servo#30508

So should generally be fine.
@ehuss
Copy link
Contributor

ehuss commented Feb 21, 2024

Thanks!

@bors r+

@bors
Copy link
Collaborator

bors commented Feb 21, 2024

📌 Commit 4402b5c has been approved by ehuss

It is now in the queue for this repository.

@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 Feb 21, 2024
@bors
Copy link
Collaborator

bors commented Feb 21, 2024

⌛ Testing commit 4402b5c with merge 194a60b...

@bors
Copy link
Collaborator

bors commented Feb 21, 2024

☀️ Test successful - checks-actions
Approved by: ehuss
Pushing 194a60b to master...

@bors bors merged commit 194a60b into rust-lang:master Feb 21, 2024
21 checks passed
@weihanglo weihanglo deleted the remove-host-libdir branch February 21, 2024 03:08
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 21, 2024
Update cargo

9 commits in 7b7af3077bff8d60b7f124189bc9de227d3063a9..194a60b2952bd5d12ba15dd2577a97eed7d3c587
2024-02-17 14:13:00 +0000 to 2024-02-21 01:53:45 +0000
- fix: remove unused `sysroot_host_libdir` (rust-lang/cargo#13468)
- feat: support `target.<triple>.rustdocflags` officially (rust-lang/cargo#13197)
- Fix unused imports on Windows. (rust-lang/cargo#13469)
- Fix more redundant imports. (rust-lang/cargo#13466)
- test: Remove empty snapshots (rust-lang/cargo#13465)
- chore: Rename `Config` to `GlobalContext` (rust-lang/cargo#13409)
- Fix redundant imports. (rust-lang/cargo#13464)
- feat: respect `rust-version` when generating lockfile (rust-lang/cargo#12861)
- chore(ci): bump CI tools (rust-lang/cargo#13459)

r? ghost
@rustbot rustbot added this to the 1.78.0 milestone Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-build-execution Area: anything dealing with executing the compiler A-cfg-expr Area: Platform cfg expressions S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants