Passing arguments to new passes

Is there a way to provide command line parameters to a “new” pass?

The legacy method was basically

static cl::opt<std::string> someOption("someOption", cl::init(""), cl::desc("some option help"));
opt -load MyPlugin -someOption value

could make use of that

But with the new PassManager that seems to be impossible. Is there an alternative?

Unfortunately, that’s not possible for new PassManager Passes (for now). I think environment variable is the most viable and easiest way to pass arguments to a Pass plugin.

thats a good suggestion. Thank you