File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed 
src/bootstrap/src/core/builder Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -433,6 +433,15 @@ impl Builder<'_> {
433433        let  out_dir = self . stage_out ( compiler,  mode) ; 
434434        cargo. env ( "CARGO_TARGET_DIR" ,  & out_dir) ; 
435435
436+         // Bootstrap makes a lot of assumptions about the artifacts produced in the target 
437+         // directory. If users override the "build directory" using `build-dir` 
438+         // (https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#build-dir), then 
439+         // bootstrap couldn't find these artifacts. So we forcefully override that option to our 
440+         // target directory here. 
441+         // In the future, we could attempt to read the build-dir location from Cargo and actually 
442+         // respect it. 
443+         cargo. env ( "CARGO_BUILD_BUILD_DIR" ,  & out_dir) ; 
444+ 
436445        // Found with `rg "init_env_logger\("`. If anyone uses `init_env_logger` 
437446        // from out of tree it shouldn't matter, since x.py is only used for 
438447        // building in-tree. 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments