Make build-config magic use memfd by default.

This commit is contained in:
Chris Fallin
2022-01-31 16:54:04 -08:00
parent ccfa245261
commit 0ff8f6ab20
9 changed files with 22 additions and 26 deletions

View File

@@ -54,14 +54,7 @@ pub unsafe fn platform_init() {
// Sometimes we need to handle SIGBUS too:
// - On ARM, handle Unaligned Accesses.
// - On Darwin, guard page accesses are raised as SIGBUS.
// - With the MemFD allocator, heap growth is controlled by
// ftruncate'ing an mmap'd file, and so out-of-bounds accesses
// are raised as SIGBUS.
if cfg!(target_arch = "arm")
|| cfg!(target_os = "macos")
|| cfg!(target_os = "freebsd")
|| cfg!(feature = "memfd-allocator")
{
if cfg!(target_arch = "arm") || cfg!(target_os = "macos") || cfg!(target_os = "freebsd") {
register(&mut PREV_SIGBUS, libc::SIGBUS);
}
}