about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-04-12 04:50:01 +0000
committerbors <bors@rust-lang.org>2023-04-12 04:50:01 +0000
commit0d7ed3ba8445452013dd873dc9abcad41a3d82b2 (patch)
treee4cae5e26f0f39289e47916af466cc1c74c96c91 /src/bootstrap
parent13d1802b8882452f7d9d1bf514a096c5c8a22303 (diff)
parent4c9cd9e739c0b746db1c5912290cb8a9a83089a2 (diff)
downloadrust-0d7ed3ba8445452013dd873dc9abcad41a3d82b2.tar.gz
rust-0d7ed3ba8445452013dd873dc9abcad41a3d82b2.zip
Auto merge of #110214 - compiler-errors:rollup-mkig4t6, r=compiler-errors
Rollup of 10 pull requests

Successful merges:

 - #96971 (Initial support for loongarch64-unknown-linux-gnu)
 - #109894 (Remove Errors section from var_os docs)
 - #110000 (Rename tests/ui/unique to tests/ui/box/unit)
 - #110018 (Pass host linker to compiletest.)
 - #110104 ( Reword the docstring in todo! macro definition, fixing a typo)
 - #110113 (Fix `x test ui --target foo` when download-rustc is enabled)
 - #110126 (Support safe transmute in new solver)
 - #110155 (Fix typos in librustdoc, tools and config files)
 - #110162 (rustdoc: remove redundant expandSection code from main.js)
 - #110173 (kmc-solid: Implement `Socket::read_buf`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/bootstrap.py1
-rw-r--r--src/bootstrap/channel.rs2
-rw-r--r--src/bootstrap/compile.rs6
-rw-r--r--src/bootstrap/lib.rs3
-rw-r--r--src/bootstrap/llvm.rs2
-rw-r--r--src/bootstrap/test.rs5
6 files changed, 12 insertions, 7 deletions
diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
index d12781cc33a..025145244c4 100644
--- a/src/bootstrap/bootstrap.py
+++ b/src/bootstrap/bootstrap.py
@@ -304,6 +304,7 @@ def default_build_triple(verbose):
         'i486': 'i686',
         'i686': 'i686',
         'i786': 'i686',
+        'loongarch64': 'loongarch64',
         'm68k': 'm68k',
         'powerpc': 'powerpc',
         'powerpc64': 'powerpc64',
diff --git a/src/bootstrap/channel.rs b/src/bootstrap/channel.rs
index 390047f6fdc..c3e3fa009a6 100644
--- a/src/bootstrap/channel.rs
+++ b/src/bootstrap/channel.rs
@@ -139,7 +139,7 @@ pub fn read_commit_info_file(root: &Path) -> Option<Info> {
                 sha: sha.to_owned(),
                 short_sha: short_sha.to_owned(),
             },
-            _ => panic!("the `git-comit-info` file is malformed"),
+            _ => panic!("the `git-commit-info` file is malformed"),
         };
         Some(info)
     } else {
diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
index e3581943f2c..85d1c12cc6a 100644
--- a/src/bootstrap/compile.rs
+++ b/src/bootstrap/compile.rs
@@ -83,11 +83,11 @@ impl Step for Std {
         let target = self.target;
         let compiler = self.compiler;
 
-        // These artifacts were already copied (in `impl Step for Sysroot`).
-        // Don't recompile them.
+        // When using `download-rustc`, we already have artifacts for the host available
+        // (they were copied in `impl Step for Sysroot`). Don't recompile them.
         // NOTE: the ABI of the beta compiler is different from the ABI of the downloaded compiler,
         // so its artifacts can't be reused.
-        if builder.download_rustc() && compiler.stage != 0 {
+        if builder.download_rustc() && compiler.stage != 0 && target == builder.build.build {
             return;
         }
 
diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
index 5ee18cf6411..eaa3afa4b7b 100644
--- a/src/bootstrap/lib.rs
+++ b/src/bootstrap/lib.rs
@@ -129,7 +129,8 @@ const EXTRA_CHECK_CFGS: &[(Option<Mode>, &'static str, Option<&[&'static str]>)]
     /* Extra values not defined in the built-in targets yet, but used in std */
     (Some(Mode::Std), "target_env", Some(&["libnx"])),
     // (Some(Mode::Std), "target_os", Some(&[])),
-    (Some(Mode::Std), "target_arch", Some(&["asmjs", "spirv", "nvptx", "xtensa"])),
+    // #[cfg(bootstrap)] loongarch64
+    (Some(Mode::Std), "target_arch", Some(&["asmjs", "spirv", "nvptx", "xtensa", "loongarch64"])),
     /* Extra names used by dependencies */
     // FIXME: Used by serde_json, but we should not be triggering on external dependencies.
     (Some(Mode::Rustc), "no_btreemap_remove_entry", None),
diff --git a/src/bootstrap/llvm.rs b/src/bootstrap/llvm.rs
index cc2b45a9bdb..d123deec354 100644
--- a/src/bootstrap/llvm.rs
+++ b/src/bootstrap/llvm.rs
@@ -291,7 +291,7 @@ impl Step for Llvm {
         let llvm_targets = match &builder.config.llvm_targets {
             Some(s) => s,
             None => {
-                "AArch64;ARM;BPF;Hexagon;MSP430;Mips;NVPTX;PowerPC;RISCV;\
+                "AArch64;ARM;BPF;Hexagon;LoongArch;MSP430;Mips;NVPTX;PowerPC;RISCV;\
                      Sparc;SystemZ;WebAssembly;X86"
             }
         };
diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs
index 058ff429e80..f9c5837b7d6 100644
--- a/src/bootstrap/test.rs
+++ b/src/bootstrap/test.rs
@@ -1535,7 +1535,10 @@ note: if you're sure you want to do this, please open an issue as to why. In the
         flags.extend(builder.config.cmd.rustc_args().iter().map(|s| s.to_string()));
 
         if let Some(linker) = builder.linker(target) {
-            cmd.arg("--linker").arg(linker);
+            cmd.arg("--target-linker").arg(linker);
+        }
+        if let Some(linker) = builder.linker(compiler.host) {
+            cmd.arg("--host-linker").arg(linker);
         }
 
         let mut hostflags = flags.clone();