Skip to content

Commit ee0f412

Browse files
committed
drop support for rustc without 'sysroot' crate
1 parent 8f34419 commit ee0f412

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

src/lib.rs

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,6 @@ impl<'a> SysrootBuilder<'a> {
299299

300300
/// Generate the contents of the manifest file for the sysroot build.
301301
fn gen_manifest(&self, src_dir: &Path) -> String {
302-
let have_sysroot_crate = src_dir.join("sysroot").exists();
303302
let have_builtins_crate = src_dir.join("compiler-builtins").exists();
304303
let crates = match &self.config {
305304
// As long as the sysroot has a patch for compiler_builtins, we need to include it in the
@@ -332,7 +331,7 @@ impl<'a> SysrootBuilder<'a> {
332331
src_dir_core = src_dir.join("core"),
333332
src_dir_alloc = src_dir.join("alloc"),
334333
),
335-
SysrootConfig::WithStd { std_features } if have_sysroot_crate => format!(
334+
SysrootConfig::WithStd { std_features } => format!(
336335
r#"
337336
[dependencies.std]
338337
features = {std_features:?}
@@ -344,19 +343,6 @@ impl<'a> SysrootBuilder<'a> {
344343
src_dir_std = src_dir.join("std"),
345344
src_dir_sysroot = src_dir.join("sysroot"),
346345
),
347-
// Fallback for old rustc where the main crate was `test`, not `sysroot`
348-
SysrootConfig::WithStd { std_features } => format!(
349-
r#"
350-
[dependencies.std]
351-
features = {std_features:?}
352-
path = {src_dir_std:?}
353-
[dependencies.test]
354-
path = {src_dir_test:?}
355-
"#,
356-
std_features = std_features,
357-
src_dir_std = src_dir.join("std"),
358-
src_dir_test = src_dir.join("test"),
359-
),
360346
};
361347

362348
// If we include a patch for rustc-std-workspace-std for no_std sysroot builds, we get a

0 commit comments

Comments
 (0)