[PATCH] D150221: Add option -fkeep-static-variables to emit all static variables

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 9 13:03:30 PDT 2023


MaskRay added a comment.

GCC has -fkeep-static-consts (which Clang supports) but not -fkeep-static-variables.

> This could be useful in cases where the presence of all static variables as symbols in the object file are required.

Can you give a more compelling reason that this option is needed?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D150221



More information about the cfe-commits mailing list