[lld] [lld] Do not implicitly link non "public" libraries (PR #97639)
Mark Rowe via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 29 17:51:03 PDT 2024
Daniel =?utf-8?q?Rodríguez_Troitiño?Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/97639 at github.com>
bdash wrote:
Thanks for the explanation. Shortly before you posted your comment I found I had blamed this change in error and that, as you note, this change did not change the behavior I had observed. My apologies for that error.
> It is of limited value to anybody that do not develop SDKs, which in the case of macOS, it is just Apple, and they use their own linker.
There's a huge benefit to validating allowable clients for third-party developers that use Apple's SDKs. Apple uses the allowed clients list to limit what is considered part of the public ABI that they have to support. If you unintentionally link directly to a framework that restricts its allowable clients, your software will break in a software update if Apple moves symbols around. Apple uses their symbol versioning tricks to preserve binary compatibility when moving public symbols, but they're unlikely to consider that for libraries that they consider to be private. If the linker does not catch this class of mistake you can end up shipping a time bomb.
https://github.com/llvm/llvm-project/pull/97639
More information about the llvm-commits
mailing list