Skip to content

Commit 7369cf9

Browse files
michalmuskalafacebook-github-bot
authored andcommitted
Disable jemalloc on openbsd (#100)
Summary: Support is experimental, users are reporting compilation issues Differential Revision: D75877273
1 parent 4edb9b6 commit 7369cf9

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

Cargo.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,7 @@ once_cell = "1.19.0"
8181
parking_lot = "0.12.3"
8282
paths = { git = "https://github.com/rust-lang/rust-analyzer", rev = "2024-08-12" }
8383
proc-macro2 = "1.0.86"
84-
profile = { features = [
85-
"jemalloc",
86-
], git = "https://github.com/rust-lang/rust-analyzer", rev = "2024-08-12" }
84+
profile = { git = "https://github.com/rust-lang/rust-analyzer", rev = "2024-08-12" }
8785
quote = "1.0.36"
8886
range-set = "0.0.10"
8987
rayon = "1.10.0"

crates/elp/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,10 @@ tracing.workspace = true
6161
vfs-notify.workspace = true
6262
vfs.workspace = true
6363

64-
[target.'cfg(not(target_env = "msvc"))'.dependencies]
64+
[target.'cfg(not(any(target_env = "msvc", target_os = "openbsd")))'.dependencies]
6565
jemalloc-ctl.workspace = true
6666
jemallocator.workspace = true
67+
profile = { workspace = true, features = ["jemalloc"] }
6768

6869
[dev-dependencies]
6970
expect-test.workspace = true

crates/elp/src/bin/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ mod reporting;
4343
mod shell;
4444

4545
// Use jemalloc as the global allocator
46-
#[cfg(not(target_env = "msvc"))]
46+
#[cfg(not(any(target_env = "msvc", target_os = "openbsd")))]
4747
use jemallocator::Jemalloc;
4848

4949
use crate::args::Args;
5050

51-
#[cfg(not(target_env = "msvc"))]
51+
#[cfg(not(any(target_env = "msvc", target_os = "openbsd")))]
5252
#[global_allocator]
5353
static GLOBAL: Jemalloc = Jemalloc;
5454
static EQWALIZER_SUPPORT_DIR: Dir = include_dir!("$EQWALIZER_SUPPORT_DIR");

crates/elp/src/memory_usage.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ impl std::ops::Sub for MemoryUsage {
4646

4747
impl MemoryUsage {
4848
pub fn now() -> MemoryUsage {
49-
#[cfg(not(target_env = "msvc"))]
49+
#[cfg(not(any(target_env = "msvc", target_os = "openbsd")))]
5050
{
5151
jemalloc_ctl::epoch::advance().unwrap();
5252
MemoryUsage {

0 commit comments

Comments
 (0)