@@ -301,18 +301,21 @@ 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+ // As long as the sysroot has a ptch for compiler_builtins, we need to include it in the
305+ // NoStd variant explicitly.
304306 SysrootConfig :: NoStd => format ! (
305307 r#"
306308 [dependencies.core]
307309 path = {src_dir_core:?}
308310 [dependencies.alloc]
309311 path = {src_dir_alloc:?}
310312 [dependencies.compiler_builtins]
313+ path = {src_dir_builtins:?}
311314 features = ["rustc-dep-of-std", "mem"]
312- version = "*"
313315 "# ,
314316 src_dir_core = src_dir. join( "core" ) ,
315317 src_dir_alloc = src_dir. join( "alloc" ) ,
318+ src_dir_builtins = src_dir. join( "compiler-builtins" ) . join( "compiler-builtins" ) ,
316319 ) ,
317320 SysrootConfig :: WithStd { std_features } if have_sysroot_crate => format ! (
318321 r#"
@@ -524,7 +527,7 @@ impl<'a> SysrootBuilder<'a> {
524527 TempDir :: new_in ( & self . sysroot_dir ) . context ( "failed to create staging dir" ) ?;
525528 // Copy the output to `$staging/lib`.
526529 let staging_lib_dir = staging_dir. path ( ) . join ( "lib" ) ;
527- fs:: create_dir ( & staging_lib_dir) . context ( "faiked to create staging/lib dir" ) ?;
530+ fs:: create_dir ( & staging_lib_dir) . context ( "failed to create staging/lib dir" ) ?;
528531 let out_dir = build_target_dir
529532 . join ( & target_name)
530533 . join ( DEFAULT_SYSROOT_PROFILE )
0 commit comments