From 9bda22aa568bf42cdd4da04f57567f11dcdb4e3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Magalh=C3=A3es?= <joamag@gmail.com> Date: Sun, 4 Jun 2023 14:17:48 +0100 Subject: [PATCH] fix: overload of FEATURES name --- build.rs | 16 ++++++++++------ src/gen/mock.rs | 2 +- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/build.rs b/build.rs index 606df06c..82e4d30e 100644 --- a/build.rs +++ b/build.rs @@ -129,16 +129,20 @@ fn main() { ); let mut features = vec!["cpu"]; - - if cfg!(feature = "wasm-extension") { + if cfg!(feature = "wasm") { features.push("wasm") } - - if cfg!(feature = "python-extension") { - features.push("python") + if cfg!(feature = "debug") { + features.push("debug") + } + if cfg!(feature = "pedantic") { + features.push("pedantic") + } + if cfg!(feature = "cpulog") { + features.push("cpulog") } - write_vec_constant(&mut file, "FEATURES", features); + write_vec_constant(&mut file, "FEATURES_SEQ", features); write_str_constant( &mut file, diff --git a/src/gen/mock.rs b/src/gen/mock.rs index 4c9a6c39..e27fd34f 100644 --- a/src/gen/mock.rs +++ b/src/gen/mock.rs @@ -11,7 +11,7 @@ pub const TARGET: &str = "-"; pub const PROFILE: &str = "-"; pub const OPT_LEVEL: &str = "-"; pub const MAKEFLAGS: &str = "-"; -pub const FEATURES: [&str; 1] = ["cpu"]; +pub const FEATURES_SEQ: [&str; 1] = ["cpu"]; pub const PLATFORM_CPU_BITS: &str = "64"; pub const PLATFORM_CPU_BITS_INT: usize = 64; -- GitLab