- When a plugin DSO loads, its dynamic initialization (
RegisterLibraryOptions<T>) will run and cause the subsequentParseCommandLineOptionsto parse its registered options among the other registered options. If this out to matter, the DSO can move to an explicitRegisterLibraryoptions<T>call. - This is an orthogonal “while we are at it” decision. While we can keep parsing
-foo=false(while every other CLI library uses something like-no-foo), I suggest that we eventually reject this form. I’ve created [Support] Accept -no-<name> to negate cl::opt<bool> by MaskRay · Pull Request #224978 · llvm/llvm-project · GitHub to support-no-fooin the current, legacy cl:: . If this is accepted, I can request a release/23.x backport (a few rust-lang/rust tests use something like-Cllvm-args=-enable-global-merge=0). Anyway, internal options do not provide stability guarantee. This is for courtesy. - We should remove the
cl::callbackfeature. They will become plain field assignment and surround code should inspect the state and make transformation. - They can stay cl::opt until the flag day, or we can move them from LLVMSupport to a different library. We can also hand write
OptTable. - Per “Why keep cl:: for now?” at the end of Q&A: cl:: shrinks as libraries and tools leave it; the end state has no
cl::opt
1 Like