Skip to content

Commit

Permalink
Conditional compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
kevingosse committed Feb 20, 2025
1 parent 84f0d6d commit aa6bc16
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion crashtracker-ffi/cbindgen.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ sys_includes = ["stdbool.h", "stddef.h", "stdint.h"]
includes = ["common.h"]
after_includes = """
#ifdef _WIN32
#if defined(_WIN32) && defined(_CRASHTRACKING_COLLECTOR)
#include <werapi.h>
#include <windows.h>
#endif
Expand All @@ -25,6 +25,7 @@ after_includes = """

[defines]
"target_os = windows" = "_WIN32"
"feature = collector_windows" = "_CRASHTRACKING_COLLECTOR"

[export]
prefix = "ddog_crasht_"
Expand Down
4 changes: 2 additions & 2 deletions crashtracker-ffi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#[cfg(all(unix, feature = "collector"))]
mod collector;
#[cfg(all(windows, feature = "collector"))]
#[cfg(all(windows, feature = "collector_windows"))]
mod collector_windows;
mod crash_info;
#[cfg(feature = "demangler")]
Expand All @@ -12,7 +12,7 @@ mod demangler;
mod receiver;
#[cfg(all(unix, feature = "collector"))]
pub use collector::*;
#[cfg(all(windows, feature = "collector"))]
#[cfg(all(windows, feature = "collector_windows"))]
pub use collector_windows::api::ddog_crasht_init_windows;
pub use crash_info::*;
#[cfg(feature = "demangler")]
Expand Down

0 comments on commit aa6bc16

Please sign in to comment.