[llvm] [MachO] Preserve weak linkage for aliases (PR #198148)

Ahmed Bougacha via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 22 05:43:22 PDT 2026


ahmedbougacha wrote:

I see this got merged as I was reading it, but:  can anyone here articulate how exactly you think aliases work on mach-o, why the diagnostics explicitly saying these aren't supported were originally added to clang, and why this is the only problem needing to be fixed for aliases to work?

#111321 links to docs about weak-linking, not aliases, and to #71001.  That, in turn, has an example claiming it works correctly using the pragma, but it doesn't, if you actually try to define the weak symbol externally (though it can be nudged into working with differently-named symbols, surely a hint that there's more to it than syntax)

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


More information about the llvm-commits mailing list