@@ -458,7 +458,7 @@ impl Step for Rustc {
458458 return tarball. generate ( ) ;
459459
460460 fn prepare_image ( builder : & Builder < ' _ > , target_compiler : Compiler , image : & Path ) {
461- let host = target_compiler. host ;
461+ let target = target_compiler. host ;
462462 let src = builder. sysroot ( target_compiler) ;
463463
464464 // Copy rustc binary
@@ -517,14 +517,14 @@ impl Step for Rustc {
517517 // components like the llvm tools and LLD. LLD is included below and
518518 // tools/LLDB come later, so let's just throw it in the rustc
519519 // component for now.
520- maybe_install_llvm_runtime ( builder, host , image) ;
520+ maybe_install_llvm_runtime ( builder, target , image) ;
521521
522- let dst_dir = image. join ( "lib/rustlib" ) . join ( host ) . join ( "bin" ) ;
522+ let dst_dir = image. join ( "lib/rustlib" ) . join ( target ) . join ( "bin" ) ;
523523 t ! ( fs:: create_dir_all( & dst_dir) ) ;
524524
525525 // Copy over lld if it's there
526526 if builder. config . lld_enabled {
527- let src_dir = builder. sysroot_target_bindir ( target_compiler, host ) ;
527+ let src_dir = builder. sysroot_target_bindir ( target_compiler, target ) ;
528528 let rust_lld = exe ( "rust-lld" , target_compiler. host ) ;
529529 builder. copy_link (
530530 & src_dir. join ( & rust_lld) ,
@@ -547,7 +547,7 @@ impl Step for Rustc {
547547 if builder. config . llvm_enabled ( target_compiler. host )
548548 && builder. config . llvm_tools_enabled
549549 {
550- let src_dir = builder. sysroot_target_bindir ( target_compiler, host ) ;
550+ let src_dir = builder. sysroot_target_bindir ( target_compiler, target ) ;
551551 let llvm_objcopy = exe ( "llvm-objcopy" , target_compiler. host ) ;
552552 let rust_objcopy = exe ( "rust-objcopy" , target_compiler. host ) ;
553553 builder. copy_link (
@@ -558,7 +558,7 @@ impl Step for Rustc {
558558 }
559559
560560 if builder. tool_enabled ( "wasm-component-ld" ) {
561- let src_dir = builder. sysroot_target_bindir ( target_compiler, host ) ;
561+ let src_dir = builder. sysroot_target_bindir ( target_compiler, target ) ;
562562 let ld = exe ( "wasm-component-ld" , target_compiler. host ) ;
563563 builder. copy_link ( & src_dir. join ( & ld) , & dst_dir. join ( & ld) , FileType :: Executable ) ;
564564 }
@@ -580,7 +580,7 @@ impl Step for Rustc {
580580 }
581581
582582 // Debugger scripts
583- builder. ensure ( DebuggerScripts { sysroot : image. to_owned ( ) , host } ) ;
583+ builder. ensure ( DebuggerScripts { sysroot : image. to_owned ( ) , target } ) ;
584584
585585 // HTML copyright files
586586 let file_list = builder. ensure ( super :: run:: GenerateCopyright ) ;
@@ -610,10 +610,12 @@ impl Step for Rustc {
610610 }
611611}
612612
613+ /// Copies debugger scripts for `target` into the given compiler `sysroot`.
613614#[ derive( Debug , Clone , Hash , PartialEq , Eq ) ]
614615pub struct DebuggerScripts {
616+ /// Sysroot of a compiler into which will the debugger scripts be copied to.
615617 pub sysroot : PathBuf ,
616- pub host : TargetSelection ,
618+ pub target : TargetSelection ,
617619}
618620
619621impl Step for DebuggerScripts {
@@ -623,16 +625,15 @@ impl Step for DebuggerScripts {
623625 run. never ( )
624626 }
625627
626- /// Copies debugger scripts for `target` into the `sysroot` specified.
627628 fn run ( self , builder : & Builder < ' _ > ) {
628- let host = self . host ;
629+ let target = self . target ;
629630 let sysroot = self . sysroot ;
630631 let dst = sysroot. join ( "lib/rustlib/etc" ) ;
631632 t ! ( fs:: create_dir_all( & dst) ) ;
632633 let cp_debugger_script = |file : & str | {
633634 builder. install ( & builder. src . join ( "src/etc/" ) . join ( file) , & dst, FileType :: Regular ) ;
634635 } ;
635- if host . contains ( "windows-msvc" ) {
636+ if target . contains ( "windows-msvc" ) {
636637 // windbg debugger scripts
637638 builder. install (
638639 & builder. src . join ( "src/etc/rust-windbg.cmd" ) ,
0 commit comments