diff options
| author | Jakub Beránek <berykubik@gmail.com> | 2025-08-12 20:23:35 +0200 |
|---|---|---|
| committer | Jakub Beránek <berykubik@gmail.com> | 2025-08-12 20:23:35 +0200 |
| commit | 614364c68107c21c417f5363553229a14c7e11c8 (patch) | |
| tree | 4c14c42fde3582deea6c202815afdb73e0b4cdee /src | |
| parent | d9dba3a55476ae2da5d4e5bce8a81b341c675750 (diff) | |
| download | rust-614364c68107c21c417f5363553229a14c7e11c8.tar.gz rust-614364c68107c21c417f5363553229a14c7e11c8.zip | |
Allow cross-compiling the Cranelift dist component
Diffstat (limited to 'src')
| -rw-r--r-- | src/bootstrap/src/core/build_steps/dist.rs | 5 | ||||
| -rw-r--r-- | src/bootstrap/src/core/build_steps/install.rs | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/bootstrap/src/core/build_steps/dist.rs b/src/bootstrap/src/core/build_steps/dist.rs index f9cb300b68e..e63f9e14efe 100644 --- a/src/bootstrap/src/core/build_steps/dist.rs +++ b/src/bootstrap/src/core/build_steps/dist.rs @@ -1410,6 +1410,7 @@ impl Step for Miri { #[derive(Debug, Clone, Hash, PartialEq, Eq)] pub struct CraneliftCodegenBackend { pub build_compiler: Compiler, + pub target: TargetSelection, } impl Step for CraneliftCodegenBackend { @@ -1437,6 +1438,7 @@ impl Step for CraneliftCodegenBackend { run.builder.config.host_target, run.target, ), + target: run.target, }); } @@ -1448,7 +1450,7 @@ impl Step for CraneliftCodegenBackend { return None; } - let target = self.build_compiler.host; + let target = self.target; let compilers = RustcPrivateCompilers::from_build_compiler(builder, self.build_compiler, target); if !target_supports_cranelift_backend(target) { @@ -1608,6 +1610,7 @@ impl Step for Extended { add_component!("analysis" => Analysis { compiler, target }); add_component!("rustc-codegen-cranelift" => CraneliftCodegenBackend { build_compiler: compiler, + target }); add_component!("llvm-bitcode-linker" => LlvmBitcodeLinker { build_compiler: compiler, diff --git a/src/bootstrap/src/core/build_steps/install.rs b/src/bootstrap/src/core/build_steps/install.rs index acee78dcf59..32eec8cefab 100644 --- a/src/bootstrap/src/core/build_steps/install.rs +++ b/src/bootstrap/src/core/build_steps/install.rs @@ -276,6 +276,7 @@ install!((self, builder, _config), RustcCodegenCranelift, alias = "rustc-codegen-cranelift", Self::should_build(_config), only_hosts: true, { if let Some(tarball) = builder.ensure(dist::CraneliftCodegenBackend { build_compiler: self.compiler, + target: self.target }) { install_sh(builder, "rustc-codegen-cranelift", self.compiler.stage, Some(self.target), &tarball); } else { |
