diff --git a/cargo-trust/src/main.rs b/cargo-trust/src/main.rs index 432703cddba42b449c6408f962a78426c18abef5..6594607c5e7365f7da83a947c0509a53d6ed5c84 100644 --- a/cargo-trust/src/main.rs +++ b/cargo-trust/src/main.rs @@ -88,6 +88,9 @@ fn run() -> Result<i32, failure::Error> { cargo.args(&["--example", &example]); } + if opt.release { + cargo.arg("--release"); + } // klee specifics cargo .args(&["--features", "klee-analysis"]) @@ -120,9 +123,12 @@ fn run() -> Result<i32, failure::Error> { // Decide what artifact to use. let artifact = if let Some(bin) = &opt.bin { cargo_project::Artifact::Bin(bin) + // cargo trust --bin yyy } else if let Some(example) = &opt.example { + // cargo trust --example xxx cargo_project::Artifact::Example(example) } else { + // cargo trust cargo_project::Artifact::Bin(project.name()) }; @@ -177,6 +183,7 @@ fn run() -> Result<i32, failure::Error> { .expect("unreachable") .starts_with(&name) { + println!("found {}", name); let modified = e.metadata()?.modified()?; if ll.is_none() { ll = Some(p);