Compile ffsdi2 with rustbuild feature

This is not used by LLVM/Rust, but is apparently used by gcc/C which jemalloc
can require at least.
This commit is contained in:
Alex Crichton 2017-07-03 14:57:42 -07:00
parent 906b2bfc5d
commit 070990f10a
2 changed files with 13 additions and 1 deletions

View File

@ -306,7 +306,7 @@ These builtins are never called by LLVM.
- ~~ctzdi2.c~~ - ~~ctzdi2.c~~
- ~~ctzsi2.c~~ - ~~ctzsi2.c~~
- ~~ctzti2.c~~ - ~~ctzti2.c~~
- ~~ffsdi2.c~~ - ~~ffsdi2.c~~ - this is [called by gcc][jemalloc-fail] though!
- ~~ffsti2.c~~ - ~~ffsti2.c~~
- ~~mulvdi3.c~~ - ~~mulvdi3.c~~
- ~~mulvsi3.c~~ - ~~mulvsi3.c~~
@ -333,6 +333,8 @@ These builtins are never called by LLVM.
- ~~ucmpti2.c~~ - ~~ucmpti2.c~~
- ~~udivmodti4.c~~ - ~~udivmodti4.c~~
[jemalloc-fail]: https://travis-ci.org/rust-lang/rust/jobs/249772758
Rust only exposes atomic types on platforms that support them, and therefore does not need to fall back to software implementations. Rust only exposes atomic types on platforms that support them, and therefore does not need to fall back to software implementations.
- ~~arm/sync_fetch_and_add_4.S~~ - ~~arm/sync_fetch_and_add_4.S~~

View File

@ -4095,6 +4095,16 @@ mod c {
], ],
); );
// When compiling in rustbuild (the rust-lang/rust repo) this library
// also needs to satisfy intrinsics that jemalloc or C in general may
// need, so include a few more that aren't typically needed by
// LLVM/Rust.
if env::var_os("CARGO_FEATURE_RUSTBUILD").is_some() {
sources.exend(&[
"ffsdi2.c",
]);
}
if target_os != "ios" { if target_os != "ios" {
sources.extend( sources.extend(
&[ &[