Skip to content

Commit

Permalink
std: Activate compiler_builtins mem feature for no_std targets
Browse files Browse the repository at this point in the history
This was an accidental regression from rust-lang#56092, but for `no_std` targets
being built and distributed we want to be sure to activate the
compiler-builtins `mem` feature which demangles important memory-related
intrinsics.
  • Loading branch information
alexcrichton committed Dec 14, 2018
1 parent 7d03617 commit c811915
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/bootstrap/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
3 changes: 3 additions & 0 deletions src/liballoc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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']

0 comments on commit c811915

Please sign in to comment.