mirror of
https://github.com/gfx-rs/wgpu.git
synced 2025-12-08 21:26:17 +00:00
Fix naga-fuzz Build on Windows (#7107)
This commit is contained in:
parent
0922631125
commit
aec14e2f63
@ -1,5 +1,7 @@
|
||||
fn main() {
|
||||
cfg_aliases::cfg_aliases! {
|
||||
enable_fuzzing: { not(any(target_arch = "wasm32", target_os = "ios", all(windows, target_arch = "aarch64"))) },
|
||||
fuzzable_platform: { not(any(target_arch = "wasm32", target_os = "ios", all(windows, target_arch = "aarch64"))) },
|
||||
}
|
||||
// This cfg provided by cargo-fuzz
|
||||
println!("cargo::rustc-check-cfg=cfg(fuzzing)");
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#![cfg_attr(enable_fuzzing, no_main)]
|
||||
#![cfg_attr(all(fuzzable_platform, fuzzing), no_main)]
|
||||
|
||||
#[cfg(enable_fuzzing)]
|
||||
#[cfg(all(fuzzable_platform, fuzzing))]
|
||||
mod fuzz {
|
||||
use std::iter::FromIterator;
|
||||
|
||||
@ -40,5 +40,5 @@ mod fuzz {
|
||||
});
|
||||
}
|
||||
|
||||
#[cfg(not(enable_fuzzing))]
|
||||
#[cfg(not(all(fuzzable_platform, fuzzing)))]
|
||||
fn main() {}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#![cfg_attr(enable_fuzzing, no_main)]
|
||||
#![cfg_attr(all(fuzzable_platform, fuzzing), no_main)]
|
||||
|
||||
#[cfg(enable_fuzzing)]
|
||||
#[cfg(all(fuzzable_platform, fuzzing))]
|
||||
mod fuzz {
|
||||
use libfuzzer_sys::fuzz_target;
|
||||
|
||||
@ -14,5 +14,5 @@ mod fuzz {
|
||||
});
|
||||
}
|
||||
|
||||
#[cfg(not(enable_fuzzing))]
|
||||
#[cfg(not(all(fuzzable_platform, fuzzing)))]
|
||||
fn main() {}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#![cfg_attr(enable_fuzzing, no_main)]
|
||||
#![cfg_attr(all(fuzzable_platform, fuzzing), no_main)]
|
||||
|
||||
#[cfg(enable_fuzzing)]
|
||||
#[cfg(all(fuzzable_platform, fuzzing))]
|
||||
mod fuzz {
|
||||
use libfuzzer_sys::fuzz_target;
|
||||
use naga::front::spv::{Frontend, Options};
|
||||
@ -12,5 +12,5 @@ mod fuzz {
|
||||
});
|
||||
}
|
||||
|
||||
#[cfg(not(enable_fuzzing))]
|
||||
#[cfg(not(all(fuzzable_platform, fuzzing)))]
|
||||
fn main() {}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#![cfg_attr(enable_fuzzing, no_main)]
|
||||
#![cfg_attr(all(fuzzable_platform, fuzzing), no_main)]
|
||||
|
||||
#[cfg(enable_fuzzing)]
|
||||
#[cfg(all(fuzzable_platform, fuzzing))]
|
||||
mod fuzz {
|
||||
use libfuzzer_sys::fuzz_target;
|
||||
use naga::front::wgsl::Frontend;
|
||||
@ -11,5 +11,5 @@ mod fuzz {
|
||||
});
|
||||
}
|
||||
|
||||
#[cfg(not(enable_fuzzing))]
|
||||
#[cfg(not(all(fuzzable_platform, fuzzing)))]
|
||||
fn main() {}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user