Make use of intrinsics a feature-flag

This commit is contained in:
Sosthène Guédon
2024-04-04 10:56:38 +02:00
committed by Robin Krahl
parent 76365b754c
commit db0cf4529f
2 changed files with 6 additions and 3 deletions
+2 -1
View File
@@ -19,4 +19,5 @@ cc = "1"
[features]
assertions = []
trace = []
malloc = []
malloc = []
software-intrinsics = []
+4 -2
View File
@@ -11,8 +11,10 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
.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");