Skip to content

Commit

Permalink
Fix Windows (msvc) build (#195)
Browse files Browse the repository at this point in the history
Fixes tkiv-jemalloc to be ignored for msvc builds, as recommended by its
documentation.
  • Loading branch information
ntfwc committed Aug 12, 2023
1 parent 96241d6 commit 6d93aa5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ extended-description = """Angle-grinder allows you to parse, aggregate, sum, ave
default = []
self-update = ["self_update"]

[dependencies]
[target.'cfg(not(target_env = "msvc"))'.dependencies]
tikv-jemallocator = "0.5.0"

[dependencies]
serde_json = "1.0.33"
itertools = "0.10.5"
nom = "7.1.1"
Expand Down
1 change: 1 addition & 0 deletions src/bin/agrind.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ use std::io;
use std::io::{stdout, BufReader};
use thiserror::Error;

#[cfg(not(target_env = "msvc"))]
#[global_allocator]
static GLOBAL: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;

Expand Down

0 comments on commit 6d93aa5

Please sign in to comment.