[clang] [llvm] [Clang][AIX] Add -mloadtime-comment-vars flag to preserve identifying variables (PR #187986)

Tony Varghese via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 19 03:36:46 PDT 2026


================
@@ -6844,6 +6844,72 @@ When ``#pragma comment(copyright, ...)`` appears in a C++20 module interface
 unit, the copyright string is embedded only in the object file compiled from
 that interface unit. Importing TUs do not re-emit the string.
 
+Preserving Identifying Variables with -mloadtime-comment-vars
+--------------------------------------------------------------
+
+The ``-mloadtime-comment-vars=`` flag accepts a comma-separated list of
+global variable names that should be preserved in the final object file as
----------------
tonykuttai wrote:

The flag takes source-level variable name as written in the C/C++ source, not the mangled name. 

https://github.com/llvm/llvm-project/pull/187986


More information about the cfe-commits mailing list