Issue 113824
Summary What causes clang to produce weak external symbols for template parameter objects?
Labels clang
Assignees
Reporter weinig
    I'm not 100% confident that this is clang, it might be the linkers doing, but I'm trying to figure out what the criteria is for when a symbol with the form "weak external template parameter object" is produced and if that criteria has changed over releases.

Background is that I'm attempting to use NTTPs somewhat extensively in a project (WebKit) that has a post build script that looks for symbols in the linked output (via `nm -m`) that are "weak external" (https://github.com/WebKit/WebKit/blob/main/Tools/Scripts/check-for-weak-vtables-and-externals#L80) and errors if it finds any. (I don't know the history behind the script.) 

I have gotten a report from the WebKit team that on older versions of clang (I am working on getting better details from them, but so far I have "Debug Sonoma and Ventura Xcode"), this script is producing an error.

I haven't been able to figure out what exactly provokes the generation of this type of symbol and was hoping there might be something I am just overlooking. My presumption is that it has to do with some ODR, but I can't work out any details.

--

In case it is helpful, the specific symbols it generates weak external for are:

__ZTAXtlN7WebCore3CSS5RangeELd0000000000000000ELd7ff0000000000000EEE 
(run through c++filt: "template parameter object for WebCore::CSS::Range{0x0p+0, inf}")
__ZTAXtlN7WebCore3CSS5RangeELdfff0000000000000ELd7ff0000000000000EEE 
(run through c++filt: "template parameter object for WebCore::CSS::Range{-inf, inf}")

and the commit it triggers on is https://github.com/WebKit/WebKit/commit/4692eacc698b91686bf635d0b4e3030853edfd97
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to