]> git.lizzy.rs Git - rust.git/blobdiff - src/bootstrap/util.rs
Rollup merge of #99287 - GuillaumeGomez:rustdoc-json-double-export, r=notriddle
[rust.git] / src / bootstrap / util.rs
index 77e6ce6b79e00147f232958a78b3e51a73a9e847..1895e2901489e187aa39fa6cf8ddae5711afd78b 100644 (file)
@@ -298,7 +298,8 @@ pub fn use_host_linker(target: TargetSelection) -> bool {
         || target.contains("nvptx")
         || target.contains("fortanix")
         || target.contains("fuchsia")
-        || target.contains("bpf"))
+        || target.contains("bpf")
+        || target.contains("switch"))
 }
 
 pub fn is_valid_test_suite_arg<'a, P: AsRef<Path>>(
@@ -336,7 +337,7 @@ pub fn is_valid_test_suite_arg<'a, P: AsRef<Path>>(
 
 pub fn run(cmd: &mut Command, print_cmd_on_fail: bool) {
     if !try_run(cmd, print_cmd_on_fail) {
-        std::process::exit(1);
+        crate::detail_exit(1);
     }
 }
 
@@ -375,7 +376,7 @@ pub fn check_run(cmd: &mut Command, print_cmd_on_fail: bool) -> bool {
 
 pub fn run_suppressed(cmd: &mut Command) {
     if !try_run_suppressed(cmd) {
-        std::process::exit(1);
+        crate::detail_exit(1);
     }
 }
 
@@ -465,7 +466,7 @@ fn dir_up_to_date(src: &Path, threshold: SystemTime) -> bool {
 
 fn fail(s: &str) -> ! {
     eprintln!("\n\n{}\n\n", s);
-    std::process::exit(1);
+    crate::detail_exit(1);
 }
 
 /// Copied from `std::path::absolute` until it stabilizes.