Skip to content

Commit f8a2991

Browse files
committed
Auto merge of #68673 - michaelwoerister:export-generics-from-std, r=<try>
[Experiment] Export generic instances from libstd. This should resolve issue #64140. However it is unclear if there are detrimental effects. Let's test if there are performance improvements to be had. r? @ghost
2 parents 212b2c7 + 73e77a7 commit f8a2991

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/bootstrap/builder.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -780,7 +780,12 @@ impl<'a> Builder<'a> {
780780
}
781781

782782
match mode {
783-
Mode::Std | Mode::ToolBootstrap | Mode::ToolStd => {}
783+
Mode::ToolBootstrap | Mode::ToolStd => {}
784+
Mode::Std => {
785+
if stage != 0 {
786+
rustflags.arg("-Zshare-generics");
787+
}
788+
}
784789
Mode::Rustc | Mode::Codegen | Mode::ToolRustc => {
785790
// Build proc macros both for the host and the target
786791
if target != compiler.host && cmd != "check" {

0 commit comments

Comments
 (0)