diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs index c84abe42a6372..689d0530f8b24 100644 --- a/src/bootstrap/compile.rs +++ b/src/bootstrap/compile.rs @@ -155,7 +155,9 @@ pub fn std_cargo(builder: &Builder, cargo .args(&["-p", "alloc"]) .arg("--manifest-path") - .arg(builder.src.join("src/liballoc/Cargo.toml")); + .arg(builder.src.join("src/liballoc/Cargo.toml")) + .arg("--features") + .arg("compiler-builtins-mem"); } else { let features = builder.std_features(); diff --git a/src/liballoc/Cargo.toml b/src/liballoc/Cargo.toml index b7faee1bc7da4..b2eb3566c04a7 100644 --- a/src/liballoc/Cargo.toml +++ b/src/liballoc/Cargo.toml @@ -28,3 +28,6 @@ path = "../liballoc/benches/lib.rs" name = "vec_deque_append_bench" path = "../liballoc/benches/vec_deque_append.rs" harness = false + +[features] +compiler-builtins-mem = ['compiler_builtins/mem']