Skip to content
Draft
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
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions libdd-profiling-ffi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -94,5 +94,16 @@ libdd-ffe-ffi = { path = "../libdd-ffe-ffi", default-features = false, optional
libdd-shared-runtime-ffi = { path = "../libdd-shared-runtime-ffi", default-features = false, optional = true }
libdd-otel-thread-ctx-ffi = { path = "../libdd-otel-thread-ctx-ffi", default-features = false, optional = true }

[dev-dependencies]
libdd-alloc = { path = "../libdd-alloc" }
libdd-common = { path = "../libdd-common" }
libdd-common-ffi = { path = "../libdd-common-ffi", features = ["std"] }

# Experimental allocation-failure harness: replaces the global allocator of its own binary.
[[test]]
name = "allocation_failure"
path = "tests/allocation_failure/main.rs"
harness = false

[package.metadata.cargo-machete]
ignored = ["libdd-regex"]
8 changes: 8 additions & 0 deletions libdd-profiling-ffi/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ extern crate build_common;
use build_common::{embed_windows_version_info, generate_and_configure_header};

fn main() {
// Must match libdd-profiling/build.rs: the allocation-failure test reaches the arena
// observer that libdd-profiling defines only under this cfg.
println!("cargo:rerun-if-env-changed=LIBDD_ALLOCATION_CHAOS_TEST");
println!("cargo:rustc-check-cfg=cfg(allocation_chaos_test)");
if std::env::var_os("LIBDD_ALLOCATION_CHAOS_TEST").is_some_and(|v| v == "1") {
println!("cargo:rustc-cfg=allocation_chaos_test");
}

let header_name = "profiling.h";
generate_and_configure_header(header_name);
embed_windows_version_info("datadog_profiling_ffi.dll", "Datadog libdatadog FFI");
Expand Down
Loading
Loading