Skip to content

Always statically link std into rustc_driver - #160622

Open
Zoxc wants to merge 1 commit into
rust-lang:mainfrom
Zoxc:always-link-std-in-rustc
Open

Always statically link std into rustc_driver#160622
Zoxc wants to merge 1 commit into
rust-lang:mainfrom
Zoxc:always-link-std-in-rustc

Conversation

@Zoxc

@Zoxc Zoxc commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

This always statically links std into rustc_driver by removing the MinGW exception.

try-job: dist-x86_64-mingw

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Aug 6, 2026
@Zoxc

Zoxc commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

@bors try

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Aug 6, 2026
Always statically link std into rustc_driver

try-job: dist-x86_64-mingw
@rust-bors

rust-bors Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 70a8565 (70a85652f1b6645ac932059b7520b7a7f2de3bca)
Base parent: b070f45 (b070f45ad92ed45b20e57d9483a21657d0d00715)

@Zoxc
Zoxc marked this pull request as ready for review August 6, 2026 14:10
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 6, 2026
@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Aug 6, 2026
@rustbot

rustbot commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

r? @clubby789

rustbot has assigned @clubby789.
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

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: bootstrap
  • bootstrap expanded to 6 candidates
  • Random selection from Mark-Simulacrum, clubby789

@Zoxc
Zoxc force-pushed the always-link-std-in-rustc branch from d869a4a to 55dd1f6 Compare August 6, 2026 14:43
@rustbot

rustbot commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@Zoxc

Zoxc commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

cc @Kobzol Another bootstrap cleanup

@Kobzol Kobzol left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, left one nit.

r? kobzol

View changes since this review

@@ -2351,12 +2351,7 @@ impl CommandLineStep for Assemble {

// If we link statically to stdlib, do not copy the libstd dynamic library file

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment should be updated.

@rustbot rustbot assigned Kobzol and unassigned clubby789 Aug 7, 2026
@Zoxc
Zoxc force-pushed the always-link-std-in-rustc branch from 55dd1f6 to efcf0fa Compare August 7, 2026 07:17

@Kobzol Kobzol left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread src/bootstrap/src/bin/rustc.rs
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Aug 7, 2026
Always statically link std into rustc_driver

try-job: dist-x86_64-mingw
@Kobzol

Kobzol commented Aug 7, 2026

Copy link
Copy Markdown
Member

@bors try jobs=dist-x86_64-linux-quick

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Aug 7, 2026
Always statically link std into rustc_driver


try-job: dist-x86_64-linux-quick
@rust-bors

rust-bors Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 268c2a8 (268c2a844322d1450c24e14a2707bd363c7cbd66)
Base parent: 88f7399 (88f7399cb4912680976e1c342ea7661b9dc84940)

@Kobzol

Kobzol commented Aug 7, 2026

Copy link
Copy Markdown
Member

@rust-timer build 268c2a8

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (268c2a8): comparison URL.

Overall result: ❌✅ regressions and improvements - please read:

Benchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf.

Next, please: If you can, justify the regressions found in this try perf run in writing along with @rustbot label: +perf-regression-triaged. If not, fix the regressions and do another perf run. Neutral or positive results will clear the label automatically.

@bors rollup=never rustc-perf
@rustbot label: -S-waiting-on-perf +perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.6% [0.6%, 0.6%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.4% [-0.5%, -0.2%] 6
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary 0.4%, secondary 0.0%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
6.8% [6.8%, 6.8%] 1
Regressions ❌
(secondary)
4.7% [3.1%, 6.2%] 2
Improvements ✅
(primary)
-6.0% [-6.0%, -6.0%] 1
Improvements ✅
(secondary)
-1.1% [-4.2%, -0.4%] 8
All ❌✅ (primary) 0.4% [-6.0%, 6.8%] 2

Cycles

Results (secondary -0.5%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
1.6% [0.5%, 2.8%] 4
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.2% [-3.1%, -0.4%] 14
All ❌✅ (primary) - - 0

Binary size

Results (secondary -0.0%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.0% [-0.0%, -0.0%] 1
All ❌✅ (primary) - - 0

Bootstrap: 460.09s -> 459.457s (-0.14%)
Artifact size: 398.62 MiB -> 398.66 MiB (0.01%)

@rustbot rustbot added the perf-regression Performance regression. label Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

perf-regression Performance regression. 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