From 4612fa517ef69b105d391e4430ed0c83798994fc Mon Sep 17 00:00:00 2001 From: Chris Fallin Date: Sun, 21 Dec 2025 20:26:41 -0800 Subject: [PATCH] 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. --- crates/cli/src/benchmark.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/cli/src/benchmark.rs b/crates/cli/src/benchmark.rs index 85e563c8..69984032 100644 --- a/crates/cli/src/benchmark.rs +++ b/crates/cli/src/benchmark.rs @@ -50,7 +50,11 @@ pub struct BenchmarkCommand { /// Configure an engine using engine-specific flags. (For the Wasmtime /// engine, these can be a subset of flags from `wasmtime run --help`). - #[structopt(long("engine-flags"), value_name = "ENGINE_FLAGS")] + #[structopt( + long("engine-flags"), + value_name = "ENGINE_FLAGS", + allow_hyphen_values = true + )] engine_flags: Option, /// How many processes should we use for each Wasm benchmark?