Skip to content

Commit 1a2ed98

Browse files
committed
Auto merge of #38675 - infinity0:more-jemalloc-fixes, r=alexcrichton
More jemalloc fixes - Disable jemalloc on s390x as well (closes #38596) - Disable jemalloc tests on platforms where it is disabled (closes #38612)
2 parents dd8e68d + cadebc7 commit 1a2ed98

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

src/librustc_back/target/s390x_unknown_linux_gnu.rs

+2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ pub fn target() -> TargetResult {
1919
// Pass the -vector feature string to LLVM to respect this assumption.
2020
base.features = "-vector".to_string();
2121
base.max_atomic_width = Some(64);
22+
// see #36994
23+
base.exe_allocation_crate = "alloc_system".to_string();
2224

2325
Ok(Target {
2426
llvm_target: "s390x-unknown-linux-gnu".to_string(),

src/test/compile-fail/allocator-rust-dylib-is-jemalloc.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,11 @@ extern crate allocator_dylib2;
2929
// ensure we get the same error.
3030
//
3131
// So long as we CI linux/OSX we should be good.
32-
#[cfg(any(target_os = "linux", target_os = "macos"))]
32+
#[cfg(any(all(target_os = "linux", any(target_arch = "x86", target_arch = "x86_64")),
33+
target_os = "macos"))]
3334
extern crate alloc_system;
34-
#[cfg(not(any(target_os = "linux", target_os = "macos")))]
35+
#[cfg(not(any(all(target_os = "linux", any(target_arch = "x86", target_arch = "x86_64")),
36+
target_os = "macos")))]
3537
extern crate allocator1;
3638

3739
fn main() {

src/test/run-pass/allocator-default.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010

1111
#![feature(alloc_jemalloc)]
1212

13-
#[cfg(any(target_os = "linux", target_os = "macos"))]
13+
#[cfg(any(all(target_os = "linux", any(target_arch = "x86", target_arch = "x86_64")),
14+
target_os = "macos"))]
1415
extern crate alloc_jemalloc;
1516

1617
fn main() {

0 commit comments

Comments
 (0)