Skip to content

Commit

Permalink
Expose USE_VALGRIND compilation flag as use-valgrind feature
Browse files Browse the repository at this point in the history
  • Loading branch information
dureuill committed Nov 27, 2024
1 parent c2439ef commit cde450c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions heed/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ mdb_idl_logn_16 = ["lmdb-master-sys/mdb_idl_logn_16"]
# computers then you need to keep your keys within the smaller 1982 byte limit.
longer-keys = ["lmdb-master-sys/longer-keys"]

use-valgrind = ["lmdb-master-sys/use-valgrind"]

[[example]]
name = "rmp-serde"
required-features = ["serde-rmp"]
1 change: 1 addition & 0 deletions lmdb-master-sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ mdb_idl_logn_13 = []
mdb_idl_logn_14 = []
mdb_idl_logn_15 = []
mdb_idl_logn_16 = []
use-valgrind = []

# Setting this enables you to use keys longer than 511 bytes. The exact limit
# is computed by LMDB at compile time. You can find the exact value by calling
Expand Down
4 changes: 4 additions & 0 deletions lmdb-master-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,10 @@ fn main() {
builder.define("MDB_USE_POSIX_SEM", None);
}

if cfg!(feature = "use-valgrind") {
builder.define("USE_VALGRIND", None);
}

if cfg!(feature = "asan") {
builder.flag("-fsanitize=address");
}
Expand Down

0 comments on commit cde450c

Please sign in to comment.