Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose USE_VALGRIND compilation flag as use-valgrind feature #288

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading