- 
                Notifications
    
You must be signed in to change notification settings  - Fork 13.9k
 
Add parallel-frontend-threads to bootstrap.toml and enable multi-threaded parallel compilation #146458
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
Conversation
| 
           This PR modifies  If appropriate, please update  This PR modifies  If appropriate, please update   | 
    
| 
           r? @clubby789 rustbot has assigned @clubby789. Use   | 
    
      
        
              This comment has been minimized.
        
        
      
    
  This comment has been minimized.
009b6b1    to
    feed02f      
    Compare
  
    
      
        
              This comment has been minimized.
        
        
      
    
  This comment has been minimized.
feed02f    to
    d4ce225      
    Compare
  
    
      
        
              This comment has been minimized.
        
        
      
    
  This comment has been minimized.
ebc3e15    to
    7c0230f      
    Compare
  
    | 
           r? @SparrowLii  @Kobzol  | 
    
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, looks good! Could you please add an Info level entry to the change_tracker.rs file?
        
          
                bootstrap.example.toml
              
                Outdated
          
        
      | # Trigger a `DebugBreak` after an internal compiler error during bootstrap on Windows | ||
| #rust.break-on-ice = true | ||
| 
               | 
          ||
| # Set the number of threads used during rustc compilation | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| # Set the number of threads used during rustc compilation | |
| # Set the number of threads for the compiler frontend used during rustc compilation (passed to `-Zthreads`). | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change also isn't limited to what is "used during rustc compilation", right? Tools, std, etc will get -Zthreads as well it seems?
        
          
                bootstrap.example.toml
              
                Outdated
          
        
      | 
               | 
          ||
| # Set the number of threads used during rustc compilation | ||
| # The valid options are: | ||
| # 1 - Use non-parallel compilation | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's only in the frontend, so it's not "non-parallel compilation"
264a516    to
    b5ebe58      
    Compare
  
    | 
           This PR was rebased onto a different master 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.  | 
    
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As lqd said, it's not only the compilation of rustc (the compiler), but pretty much all Rust code built by bootstrap. Left three suggestions, if you accept them, and then squash the commits, I think we can go ahead and merge this :) Thanks!
…aded parallel compilation
        
          
                bootstrap.example.toml
              
                Outdated
          
        
      | # 0 - Set the number of threads according to the detected number of threads of the host system | ||
| # 0 - Set the number of threads according to the detected number of threads of the host system | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Equal lines.
f09635a    to
    929c933      
    Compare
  
    | 
           Thank you! @bors r+ rollup  | 
    
Rollup of 7 pull requests Successful merges: - #146458 (Add parallel-frontend-threads to bootstrap.toml and enable multi-threaded parallel compilation) - #146485 (Remove unsized arg handling in `ArgAbiBuilderMethods::store_fn_arg` implementations) - #146536 (clean up several trait related UI tests) - #146598 (Make llvm_enzyme a regular cargo feature) - #146647 (Move `#[rustc_coherence_is_core]` to the `crate_level` file) - #146654 (Do not use `git -C dir`) - #146681 (Add space after brace in `Box<[T]>::new_uninit_slice` example) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #146458 - Hayden602:bootstrap, r=Kobzol Add parallel-frontend-threads to bootstrap.toml and enable multi-threaded parallel compilation Add the option to use the parallel compiler when building Rust code in bootstrap.
…zelmann Rollup of 7 pull requests Successful merges: - rust-lang#146458 (Add parallel-frontend-threads to bootstrap.toml and enable multi-threaded parallel compilation) - rust-lang#146485 (Remove unsized arg handling in `ArgAbiBuilderMethods::store_fn_arg` implementations) - rust-lang#146536 (clean up several trait related UI tests) - rust-lang#146598 (Make llvm_enzyme a regular cargo feature) - rust-lang#146647 (Move `#[rustc_coherence_is_core]` to the `crate_level` file) - rust-lang#146654 (Do not use `git -C dir`) - rust-lang#146681 (Add space after brace in `Box<[T]>::new_uninit_slice` example) r? `@ghost` `@rustbot` modify labels: rollup
Add the option to use the parallel compiler when building Rust code in bootstrap.