|
| 1 | +From 67b5990472e3cac643d8cf90f45fe42201ddec3c Mon Sep 17 00:00:00 2001 |
| 2 | +From: jyn <github@jyn.dev> |
| 3 | +Date: Mon, 10 Jul 2023 15:59:30 -0500 |
| 4 | +Subject: [PATCH] Revert "Fix `x test lint-docs` when download-rustc is |
| 5 | + enabled" |
| 6 | + |
| 7 | +This was not the correct fix. The problem was two-fold: |
| 8 | +- `download-rustc` didn't respect `llvm.assertions` |
| 9 | +- `rust-dev` was missing a bump to `download-ci-llvm-stamp` |
| 10 | + |
| 11 | +The first is fixed in this PR and the latter was fixed a while ago. Revert this change to avoid breaking `rpath = false`. |
| 12 | +--- |
| 13 | + src/tools/lint-docs/src/groups.rs | 1 - |
| 14 | + src/tools/lint-docs/src/lib.rs | 6 ------ |
| 15 | + 2 files changed, 7 deletions(-) |
| 16 | + |
| 17 | +diff --git a/src/tools/lint-docs/src/groups.rs b/src/tools/lint-docs/src/groups.rs |
| 18 | +index b11fb287cf4dd..5be8ef7996bb2 100644 |
| 19 | +--- a/src/tools/lint-docs/src/groups.rs |
| 20 | ++++ b/src/tools/lint-docs/src/groups.rs |
| 21 | +@@ -39,7 +39,6 @@ impl<'a> LintExtractor<'a> { |
| 22 | + fn collect_groups(&self) -> Result<LintGroups, Box<dyn Error>> { |
| 23 | + let mut result = BTreeMap::new(); |
| 24 | + let mut cmd = Command::new(self.rustc_path); |
| 25 | +- cmd.env_remove("LD_LIBRARY_PATH"); |
| 26 | + cmd.arg("-Whelp"); |
| 27 | + let output = cmd.output().map_err(|e| format!("failed to run command {:?}\n{}", cmd, e))?; |
| 28 | + if !output.status.success() { |
| 29 | +diff --git a/src/tools/lint-docs/src/lib.rs b/src/tools/lint-docs/src/lib.rs |
| 30 | +index fe29b9abda39a..b7c8b9ed2e318 100644 |
| 31 | +--- a/src/tools/lint-docs/src/lib.rs |
| 32 | ++++ b/src/tools/lint-docs/src/lib.rs |
| 33 | +@@ -403,12 +403,6 @@ impl<'a> LintExtractor<'a> { |
| 34 | + fs::write(&tempfile, source) |
| 35 | + .map_err(|e| format!("failed to write {}: {}", tempfile.display(), e))?; |
| 36 | + let mut cmd = Command::new(self.rustc_path); |
| 37 | +- // NOTE: bootstrap sets `LD_LIBRARY_PATH` for building lint-docs itself. |
| 38 | +- // Unfortunately, lint-docs is a bootstrap tool while rustc is built from source, |
| 39 | +- // and sometimes the paths conflict. In particular, when using `download-rustc`, |
| 40 | +- // the LLVM versions can differ between `ci-llvm` and `ci-rustc-sysroot`. |
| 41 | +- // Unset LD_LIBRARY_PATH here so it doesn't interfere with running the compiler. |
| 42 | +- cmd.env_remove("LD_LIBRARY_PATH"); |
| 43 | + if options.contains(&"edition2015") { |
| 44 | + cmd.arg("--edition=2015"); |
| 45 | + } else { |
0 commit comments