Update sysroot crates

This commit is contained in:
Lukas Wirth 2022-11-07 11:45:52 +01:00
parent e47460b208
commit 8ad4a1d118
2 changed files with 35 additions and 71 deletions

View file

@ -128,14 +128,18 @@ impl Sysroot {
}
if let Some(alloc) = sysroot.by_name("alloc") {
if let Some(core) = sysroot.by_name("core") {
sysroot.crates[alloc].deps.push(core);
for dep in ALLOC_DEPS.trim().lines() {
if let Some(dep) = sysroot.by_name(dep) {
sysroot.crates[alloc].deps.push(dep)
}
}
}
if let Some(proc_macro) = sysroot.by_name("proc_macro") {
if let Some(std) = sysroot.by_name("std") {
sysroot.crates[proc_macro].deps.push(std);
for dep in PROC_MACRO_DEPS.trim().lines() {
if let Some(dep) = sysroot.by_name(dep) {
sysroot.crates[proc_macro].deps.push(dep)
}
}
}
@ -239,6 +243,7 @@ fn get_rust_src(sysroot_path: &AbsPath) -> Option<AbsPathBuf> {
const SYSROOT_CRATES: &str = "
alloc
backtrace
core
panic_abort
panic_unwind
@ -246,17 +251,19 @@ proc_macro
profiler_builtins
std
stdarch/crates/std_detect
term
test
unwind";
const ALLOC_DEPS: &str = "core";
const STD_DEPS: &str = "
alloc
core
panic_abort
panic_unwind
panic_abort
core
profiler_builtins
unwind
std_detect
term
test
unwind";
test";
const PROC_MACRO_DEPS: &str = "std";