Skip to content

Commit 4612fa5

Browse files
committed
Sightglass CLI: allow hyphens in engine flags.
Currently, `--engine-flags '-Ccranelift-...=...'` fails to work because the structopt argument parser sees the `-C...` as a new argument. The `allow_hyphen_values` option allows such usage to work, which is very convenient for running experiments with different optimization options without rebuilding the `.so` with modified defaults.
1 parent 8473c4d commit 4612fa5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

crates/cli/src/benchmark.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,11 @@ pub struct BenchmarkCommand {
5050

5151
/// Configure an engine using engine-specific flags. (For the Wasmtime
5252
/// engine, these can be a subset of flags from `wasmtime run --help`).
53-
#[structopt(long("engine-flags"), value_name = "ENGINE_FLAGS")]
53+
#[structopt(
54+
long("engine-flags"),
55+
value_name = "ENGINE_FLAGS",
56+
allow_hyphen_values = true
57+
)]
5458
engine_flags: Option<String>,
5559

5660
/// How many processes should we use for each Wasm benchmark?

0 commit comments

Comments
 (0)