Skip to content

Commit ef49515

Browse files
committed
Auto merge of #189 - tamird:update-comment-rustbuild, r=alexcrichton
Update rustbuild commentary r? @nikomatsakis This is the reason that rust-lang/rust#44509 doesn't work - the `rustbuild` feature _is_ actually used, it was just incorrectly documented here and I missed it.
2 parents 915293c + a32e76e commit ef49515

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

build.rs

+8-4
Original file line numberDiff line numberDiff line change
@@ -4106,9 +4106,11 @@ mod c {
41064106
// also needs to satisfy intrinsics that jemalloc or C in general may
41074107
// need, so include a few more that aren't typically needed by
41084108
// LLVM/Rust.
4109-
sources.extend(&[
4110-
"ffsdi2.c",
4111-
]);
4109+
if cfg!(feature = "rustbuild") {
4110+
sources.extend(&[
4111+
"ffsdi2.c",
4112+
]);
4113+
}
41124114

41134115
if target_os != "ios" {
41144116
sources.extend(
@@ -4359,7 +4361,9 @@ mod c {
43594361
sources.remove(&["aeabi_cdcmp", "aeabi_cfcmp"]);
43604362
}
43614363

4362-
let root = if env::var_os("CARGO_FEATURE_RUSTBUILD").is_some() {
4364+
// When compiling in rustbuild (the rust-lang/rust repo) this build
4365+
// script runs from a directory other than this root directory.
4366+
let root = if cfg!(feature = "rustbuild") {
43634367
Path::new("../../libcompiler_builtins")
43644368
} else {
43654369
Path::new(".")

0 commit comments

Comments
 (0)