Skip to content

Commit 2400597

Browse files
committed
support using the in-tree compiler_builtins
1 parent f452b2e commit 2400597

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,18 +301,20 @@ impl<'a> SysrootBuilder<'a> {
301301
fn gen_manifest(&self, src_dir: &Path) -> String {
302302
let have_sysroot_crate = src_dir.join("sysroot").exists();
303303
let crates = match &self.config {
304+
// For some reason, the NoStd variant needs an explicit `compiler_builtins` here...
304305
SysrootConfig::NoStd => format!(
305306
r#"
306307
[dependencies.core]
307308
path = {src_dir_core:?}
308309
[dependencies.alloc]
309310
path = {src_dir_alloc:?}
310311
[dependencies.compiler_builtins]
312+
path = {src_dir_builtins:?}
311313
features = ["rustc-dep-of-std", "mem"]
312-
version = "*"
313314
"#,
314315
src_dir_core = src_dir.join("core"),
315316
src_dir_alloc = src_dir.join("alloc"),
317+
src_dir_builtins = src_dir.join("compiler-builtins").join("compiler-builtins"),
316318
),
317319
SysrootConfig::WithStd { std_features } if have_sysroot_crate => format!(
318320
r#"

0 commit comments

Comments
 (0)