diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2023-05-04 11:24:58 +0000 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2023-05-04 11:24:58 +0000 |
| commit | 7905fa92ce86167625d5b87c402bc0cef9497124 (patch) | |
| tree | 37649405d12f0f64e2a117d7c5f5cb56e9144990 | |
| parent | edd0e5df3b4f9d291f045e869f7e67e7ded8a94f (diff) | |
| download | rust-7905fa92ce86167625d5b87c402bc0cef9497124.tar.gz rust-7905fa92ce86167625d5b87c402bc0cef9497124.zip | |
Fix rustc test suite
| -rw-r--r-- | scripts/rustc-clif.rs | 4 | ||||
| -rw-r--r-- | scripts/rustdoc-clif.rs | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/scripts/rustc-clif.rs b/scripts/rustc-clif.rs index ab496a4a684..7ef3488672d 100644 --- a/scripts/rustc-clif.rs +++ b/scripts/rustc-clif.rs @@ -22,7 +22,9 @@ fn main() { let mut codegen_backend_arg = OsString::from("-Zcodegen-backend="); codegen_backend_arg.push(cg_clif_dylib_path); args.push(codegen_backend_arg); - if !passed_args.contains(&OsString::from("--sysroot")) { + if !passed_args.iter().any(|arg| { + arg == "--sysroot" || arg.to_str().map(|s| s.starts_with("--sysroot=")) == Some(true) + }) { args.push(OsString::from("--sysroot")); args.push(OsString::from(sysroot.to_str().unwrap())); } diff --git a/scripts/rustdoc-clif.rs b/scripts/rustdoc-clif.rs index 545844446c5..72024e0d494 100644 --- a/scripts/rustdoc-clif.rs +++ b/scripts/rustdoc-clif.rs @@ -22,7 +22,9 @@ fn main() { let mut codegen_backend_arg = OsString::from("-Zcodegen-backend="); codegen_backend_arg.push(cg_clif_dylib_path); args.push(codegen_backend_arg); - if !passed_args.contains(&OsString::from("--sysroot")) { + if !passed_args.iter().any(|arg| { + arg == "--sysroot" || arg.to_str().map(|s| s.starts_with("--sysroot=")) == Some(true) + }) { args.push(OsString::from("--sysroot")); args.push(OsString::from(sysroot.to_str().unwrap())); } |
