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

Remove rustc's std copy #128986

Closed
wants to merge 1 commit into from
Closed

Conversation

Zoxc
Copy link
Contributor

@Zoxc Zoxc commented Aug 11, 2024

This removes rustc's std copy if we're statically linking std into rustc_driver. This copy is not needed after #122362.

try-job: dist-x86_64-linux
try-job: dist-x86_64-msvc

@rustbot
Copy link
Collaborator

rustbot commented Aug 11, 2024

r? @Kobzol

rustbot has assigned @Kobzol.
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 S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Aug 11, 2024
@Kobzol
Copy link
Contributor

Kobzol commented Aug 12, 2024

Could you please comment this line in this PR, to enable post-optimization tests in the x64 Linux dist runner? Then we can try the dist tests in try builds.

@lqd
Copy link
Member

lqd commented Aug 12, 2024

This PR is still a WIP in order to run tests/debug/try alternatives on builders, right? As it currently looks like dd3f757 which failed in the previous PR.

@Zoxc
Copy link
Contributor Author

Zoxc commented Aug 12, 2024

I haven't tracked down the reason for the test failure yet. Does post-optimization tests specify the final binary as stage0-sysroot? Then runs tests as stage0 with a new std build?

@Kobzol
Copy link
Contributor

Kobzol commented Aug 12, 2024

Yeah, post-optimization tests essentially take the sysroot created in the dist step, and try to run tests with it (using the "allow stage0 sysroot" hack). It is implemented here.

@Kobzol
Copy link
Contributor

Kobzol commented Sep 4, 2024

It seems like this could progress after #129941. I tried it locally and we can remove the stage != "0" check and do this. And then see what tests break :)

@Kobzol
Copy link
Contributor

Kobzol commented Sep 30, 2024

I tried to move forward with this in #112049. Currently, incremental dist tests fail on Windows when the libstd.dll file is missing (maybe it's due to some bug, e.g. too many DLL files are being removed). Trying to investigate.

@Kobzol
Copy link
Contributor

Kobzol commented Oct 3, 2024

Posted #131188 with some additional modifications.

@lqd
Copy link
Member

lqd commented Oct 3, 2024

Ah so we still don’t really know what’s going on to fix it "properly" on windows as well?

@Kobzol
Copy link
Contributor

Kobzol commented Oct 3, 2024

I have no idea why the tests fail on Windows :( https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Failing.20incr.20tests.20on.20Windows.20when.20std.2Edll.20is.20missing/near/474507064

bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 5, 2024
…, r=onur-ozkan

Do not copy libstd dynamic library to sysroot

Since rust-lang#122362, rustc links statically to libstd.[so|dll]. Which means that the libstd.[so|dll] file no longer has to be in the rustc sysroot. However, we are currently still shipping this file, in every new release of Rust, for no reason, it's just wasted bytes.

This PR removes the dynamic library file from the built sysroot.

However, it is not yet performed on Windows, because stage0 incremental tests start failing there (see description of the issue [here](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Failing.20incr.20tests.20on.20Windows.20when.20std.2Edll.20is.20missing/near/474507064)).

This is an extended version of rust-lang#128986.
CC `@Zoxc`
@Kobzol
Copy link
Contributor

Kobzol commented Oct 5, 2024

Probably can be closed now that #131188 was merged.

@Kobzol Kobzol closed this Oct 5, 2024
@bors
Copy link
Contributor

bors commented Oct 5, 2024

☔ The latest upstream changes (presumably #131188) made this pull request unmergeable. Please resolve the merge conflicts.

RalfJung pushed a commit to RalfJung/miri that referenced this pull request Oct 14, 2024
…ozkan

Do not copy libstd dynamic library to sysroot

Since rust-lang/rust#122362, rustc links statically to libstd.[so|dll]. Which means that the libstd.[so|dll] file no longer has to be in the rustc sysroot. However, we are currently still shipping this file, in every new release of Rust, for no reason, it's just wasted bytes.

This PR removes the dynamic library file from the built sysroot.

However, it is not yet performed on Windows, because stage0 incremental tests start failing there (see description of the issue [here](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Failing.20incr.20tests.20on.20Windows.20when.20std.2Edll.20is.20missing/near/474507064)).

This is an extended version of rust-lang/rust#128986.
CC `@Zoxc`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants