Files
codex/codex-rs/.cargo/config.toml
T
Dmitriy Kovalenko a94ba8bdd0 Reduce jemalloc arena count for Linux musl builds (#58399)
## Why

Reduce idle RSS after Linux musl conversations unload by using roughly one jemalloc arena per four CPUs.

## What changed

Set `JEMALLOC_SYS_WITH_MALLOC_CONF` to `narenas_ratio:0.25` in both Cargo's environment and Bazel's `tikv-jemalloc-sys` build script environment.

GitOrigin-RevId: fa05961f88b2f2e8716b75f5582eecacb2fc5a8e
2026-10-30 18:02:30 +00:00

22 lines
1.1 KiB
TOML

[env]
# Roughly one arena per four CPUs reduces idle RSS after Linux musl conversations unload.
JEMALLOC_SYS_WITH_MALLOC_CONF = "narenas_ratio:0.25"
# curl-sys enables its NTLM sources but does not set the flag required by libcurl 8.21.
CFLAGS_aarch64_pc_windows_gnullvm = "-DCURL_ENABLE_NTLM"
CFLAGS_aarch64_pc_windows_msvc = "-DCURL_ENABLE_NTLM"
CFLAGS_x86_64_pc_windows_gnullvm = "-DCURL_ENABLE_NTLM"
CFLAGS_x86_64_pc_windows_msvc = "-DCURL_ENABLE_NTLM"
[target.'cfg(all(windows, target_env = "msvc"))']
rustflags = ["-C", "link-arg=/STACK:8388608", "-C", "target-feature=+crt-static"]
# MSVC emits a warning about code that may trip "Cortex-A53 MPCore processor bug #843419" (see
# https://developer.arm.com/documentation/epm048406/latest) which is sometimes emitted by LLVM.
# Since Arm64 Windows 10+ isn't supported on that processor, it's safe to disable the warning.
[target.aarch64-pc-windows-msvc]
rustflags = ["-C", "link-arg=/STACK:8388608", "-C", "link-arg=/arm64hazardfree"]
[target.'cfg(all(windows, target_env = "gnu"))']
rustflags = ["-C", "link-arg=-Wl,--stack,8388608"]