Skip to content

Commit

Permalink
Add target u32/u64 backend feature overrides
Browse files Browse the repository at this point in the history
  • Loading branch information
pinkforest committed Dec 7, 2022
1 parent 29466f1 commit 84365f7
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions src/backend/serial/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,27 @@ use cfg_if::cfg_if;

cfg_if! {
if #[cfg(feature = "fiat_backend")] {
#[cfg(not(target_pointer_width = "64"))]

#[cfg(all(feature = "fiat_64", feature = "fiat_32"))]
compile_error!("Overrides fiat_64 or fiat_32 are mutually exclusive - cannot enable both.");

#[cfg(any(not(target_pointer_width = "64"), feature = "fiat_64"))]
pub mod fiat_u32;

#[cfg(target_pointer_width = "64")]
#[cfg(any(target_pointer_width = "32", feature = "fiat_32"))]
pub mod fiat_u64;

} else {
#[cfg(not(target_pointer_width = "64"))]

#[cfg(all(feature = "serial_64", feature = "serial_32"))]
compile_error!("Overrides serial_64 or serial_32 are mutually exclusive - cannot enable both.");

#[cfg(any(not(target_pointer_width = "64"), feature = "serial_64"))]
pub mod u32;

#[cfg(target_pointer_width = "64")]
#[cfg(any(target_pointer_width = "32", feature = "serial_32"))]
pub mod u64;

}
}

Expand Down

0 comments on commit 84365f7

Please sign in to comment.