Use jemalloc-sys on Linux and OSX compilers
This commit adds opt-in support to the compiler to link to `jemalloc` in the compiler. When activated the compiler will depend on `jemalloc-sys`, instruct jemalloc to unprefix its symbols, and then link to it. The feature is activated by default on Linux/OSX compilers for x86_64/i686 platforms, and it's not enabled anywhere else for now. We may be able to opt-in other platforms in the future! Also note that the opt-in only happens on CI, it's otherwise unconditionally turned off by default. Closes #36963
This commit is contained in:
@@ -530,7 +530,11 @@ impl Build {
|
||||
|
||||
/// Get the space-separated set of activated features for the compiler.
|
||||
fn rustc_features(&self) -> String {
|
||||
String::new()
|
||||
let mut features = String::new();
|
||||
if self.config.jemalloc {
|
||||
features.push_str("jemalloc");
|
||||
}
|
||||
features
|
||||
}
|
||||
|
||||
/// Component directory that Cargo will produce output into (e.g.
|
||||
|
||||
Reference in New Issue
Block a user