diff --git a/Cargo.toml b/Cargo.toml index 7f65a06..6ee61f7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,4 +19,5 @@ cc = "1" [features] assertions = [] trace = [] -malloc = [] \ No newline at end of file +malloc = [] +software-intrinsics = [] diff --git a/build.rs b/build.rs index c8d27d7..0cbeccd 100644 --- a/build.rs +++ b/build.rs @@ -11,8 +11,10 @@ fn main() -> Result<(), Box> { .flag("-DLFS_NO_ERROR") .file("littlefs/lfs.c") .file("littlefs/lfs_util.c") - .file("string.c") - ; + .file("string.c"); + + #[cfg(feature = "software-intrinsics")] + let builder = builder.flag("-DLFS_NO_INTRINSICS"); #[cfg(not(feature = "assertions"))] let builder = builder.flag("-DLFS_NO_ASSERT");