Skip to content

Commit

Permalink
Allow passing "-vv" to cargo fuzz
Browse files Browse the repository at this point in the history
It should help to figure out how libFuzzer is built and linked
against, which in turn should be useful in scenarios like
google/oss-fuzz#5867 (comment)
  • Loading branch information
evverx committed Jun 4, 2021
1 parent ede133e commit 37551a3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ pub struct BuildOptions {
pub debug_assertions: bool,

/// Build target with verbose output from `cargo build`
#[structopt(short = "v", long = "verbose")]
pub verbose: bool,
#[structopt(short = "v", long = "verbose", parse(from_occurrences))]
pub verbose: i32,

#[structopt(long = "no-default-features")]
/// Build artifacts with default Cargo features disabled
Expand Down Expand Up @@ -144,8 +144,8 @@ impl stdfmt::Display for BuildOptions {
write!(f, " -a")?;
}

if self.verbose {
write!(f, " -v")?;
for _ in 0..self.verbose {
write!(f, " --verbose")?;
}

if self.no_default_features {
Expand Down
4 changes: 2 additions & 2 deletions src/project.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ impl FuzzProject {
if !build.dev {
cmd.arg("--release");
}
if build.verbose {
cmd.arg("--verbose");
for _ in 0..build.verbose {
cmd.arg("-v");
}
if build.no_default_features {
cmd.arg("--no-default-features");
Expand Down

0 comments on commit 37551a3

Please sign in to comment.