diff --git a/src/options/run.rs b/src/options/run.rs index 2d66511..6b2b2c5 100644 --- a/src/options/run.rs +++ b/src/options/run.rs @@ -29,6 +29,12 @@ pub struct Run { /// Number of concurrent jobs to run pub jobs: u16, + /// By default the 'cfg(fuzzing_repro)' compilation configuration is set + /// when a single test case is being run, and this flag allows you to opt + /// out of it. + #[arg(long)] + pub no_cfg_fuzzing_repro: bool, + #[arg(last(true))] /// Additional libFuzzer arguments passed through to the binary pub args: Vec, @@ -37,7 +43,7 @@ pub struct Run { impl RunCommand for Run { fn run_command(&mut self) -> Result<()> { let project = FuzzProject::new(self.fuzz_dir_wrapper.fuzz_dir.to_owned())?; - self.build.cfg_fuzzing_repro = !self.corpus.is_empty(); + self.build.cfg_fuzzing_repro = !self.corpus.is_empty() && !self.no_cfg_fuzzing_repro; project.exec_fuzz(self) } }