handle cfg bootstrap on compiler and miri

Signed-off-by: onur-ozkan <work@onurozkan.dev>
This commit is contained in:
onur-ozkan
2025-05-27 18:28:46 +03:00
parent 613eceb80e
commit 37cd39f3ce
8 changed files with 66 additions and 8 deletions

View File

@@ -859,8 +859,19 @@ fn get_thread_id() -> u32 {
std::thread::current().id().as_u64().get() as u32
}
// cfg(bootstrap)
macro_rules! cfg_select_dispatch {
($($tokens:tt)*) => {
#[cfg(bootstrap)]
cfg_match! { $($tokens)* }
#[cfg(not(bootstrap))]
cfg_select! { $($tokens)* }
};
}
// Memory reporting
cfg_select! {
cfg_select_dispatch! {
windows => {
pub fn get_resident_set_size() -> Option<usize> {
use windows::{