diff --git a/build.rs b/build.rs index 8a47ba0..74f0aaa 100644 --- a/build.rs +++ b/build.rs @@ -1,7 +1,7 @@ /* MIT License -Copyright (c) 2019-2023 Michael Lass +Copyright (c) 2019-2024 Michael Lass Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -25,29 +25,37 @@ SOFTWARE. use e2p_sys::CONSTANTS; fn main() { + // Available features + println!("cargo::rustc-check-cfg=cfg(INLINE_DATA)"); + println!("cargo::rustc-check-cfg=cfg(PROJINHERIT)"); + println!("cargo::rustc-check-cfg=cfg(ENCRYPT)"); + println!("cargo::rustc-check-cfg=cfg(VERITY)"); + println!("cargo::rustc-check-cfg=cfg(CASEFOLD)"); + println!("cargo::rustc-check-cfg=cfg(DAX)"); + // Introduced in v1.43 if CONSTANTS.iter().any(|&s| s == "EXT4_INLINE_DATA_FL") { - println!("cargo:rustc-cfg=INLINE_DATA"); + println!("cargo::rustc-cfg=INLINE_DATA"); } if CONSTANTS.iter().any(|&s| s == "EXT4_PROJINHERIT_FL") { - println!("cargo:rustc-cfg=PROJINHERIT"); + println!("cargo::rustc-cfg=PROJINHERIT"); } if CONSTANTS.iter().any(|&s| s == "EXT4_ENCRYPT_FL") { - println!("cargo:rustc-cfg=ENCRYPT"); + println!("cargo::rustc-cfg=ENCRYPT"); } // Introduced in v1.44.4 if CONSTANTS.iter().any(|&s| s == "EXT4_VERITY_FL") { - println!("cargo:rustc-cfg=VERITY"); + println!("cargo::rustc-cfg=VERITY"); } // Introduced in v1.45.0 if CONSTANTS.iter().any(|&s| s == "EXT4_CASEFOLD_FL") { - println!("cargo:rustc-cfg=CASEFOLD"); + println!("cargo::rustc-cfg=CASEFOLD"); } // Introduced in v1.45.7 if CONSTANTS.iter().any(|&s| s == "FS_DAX_FL") { - println!("cargo:rustc-cfg=DAX"); + println!("cargo::rustc-cfg=DAX"); } }