[PATCH] D75579: [WIP] Replace MCTargetOptionsCommandFlags.inc and CommandFlags.inc by libraries

serge via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 10 08:07:05 PDT 2020


serge-sans-paille added a comment.

@MaskRay

>   because that will cause duplicate registration of llvm::cl::opt flags.

Not with this setup, if I'm not mistaken: the static registration is triggered by the static variables inside the constructor call, and if I'm not mistaken, initialization of such variables only happens once. Basically, this relies on the unicity of the constructor symbol, and this is granted by the fact there's only one lib defining it (either libLLVM or libLLVMCodeGen).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75579/new/

https://reviews.llvm.org/D75579





More information about the cfe-commits mailing list