[clang] [memprof] Export __memprof_default_options_str on Darwin (PR #128920)
Teresa Johnson via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 26 10:03:25 PST 2025
================
@@ -1617,6 +1617,10 @@ void DarwinClang::AddLinkRuntimeLibArgs(const ArgList &Args,
}
}
+ if (Sanitize.needsMemProfRt())
+ if (hasExportSymbolDirective(Args))
+ addExportedSymbol(CmdArgs, "___memprof_default_options_str");
----------------
teresajohnson wrote:
Looks like this file already includes a header from llvm/ProfileData, so maybe put it into MemProf.h in that directory?
I just noticed that the symbol name here has an extra leading underscore (noticed because I couldn't find it searching the code). Which would be avoided by using a common variable. But also makes me wonder how this is working?
https://github.com/llvm/llvm-project/pull/128920
More information about the cfe-commits
mailing list