diff --git a/cargo-klee/src/main.rs b/cargo-klee/src/main.rs index c3b3c79b748e8345c2f83f621481e871654d24b4..1acf11fe0403d7f4dbec9321defe5fa1a35e719a 100644 --- a/cargo-klee/src/main.rs +++ b/cargo-klee/src/main.rs @@ -97,6 +97,13 @@ fn run() -> Result<i32, failure::Error> { .short("g") .help("Run the generated replay binary in `gdb`. The environment variable `GDB_CWD` determines the `gdb` working directory, if unset `gdb` will execute in the current working directory"), ) + // This needs to be the last argument! + .arg( + Arg::with_name("options") + .takes_value(true) + .raw(true) + .help("Add native `klee` CLI options after the sequence `--`. See `klee --help` for all available options.") + ) .get_matches(); let is_example = matches.is_present("example"); @@ -278,6 +285,12 @@ fn run() -> Result<i32, failure::Error> { // klee analysis if is_ktest || !is_replay { let mut klee = Command::new("klee"); + // Check for additional KLEE options which will be sent to `klee` + if let Some(klee_options) = matches.values_of("options") { + for option in klee_options { + klee.arg(option); + } + } klee // ll file to analyse .arg(ll.unwrap());