mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-19 14:01:08 +01:00
Fix naga-fuzz Build on Windows (#7107)
This commit is contained in:
1 parent
0922631125
commit
aec14e2f63
5 files changed
+15
-13
No files matched your search
+3
-1
@@ -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() {}
|
||||
Reference in new issue
Block a user