[PATCH] D117250: [lld-macho] Mention string literal deduplication as a difference from ld64

Keith Smiley via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 13 16:38:51 PST 2022


keith added a comment.

In D117250#3242166 <https://reviews.llvm.org/D117250#3242166>, @oontvoo wrote:

>> Specifically the proliferation of closed source libraries for analytics / fraud / payments are very common, and might have these subtle bugs that developers cannot easily fix. Really I think flipping the default would just be a benefit for folks who were onboarding.
>
> I think I agree with int3 here that de-duping by default is more likely to lead to bugs. (in fact, we've already found a lot of cases in our codebase where people incorrectly depended on it; none of which would likely have been identified had we not tried switching over to lld)

It's definitely true that you would be more likely to introduce bugs in your own code with deduping on, but in the closed source binary case, where the producers of these aren't likely to be using lld themselves, us finding those bugs downstream isn't super helpful. Tbh even if we did find it I'm not sure all vendors would be receptive to bugs that only reproduce with the non-default linker, but that's tbd if we can actually even spot them given they could be much more subtle logic errors. It's too bad that there isn't a clang warning for this case AFAICT.

Regardless I still think this is a question of whether usage defaults should mirror ld64, or prefer performance.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D117250/new/

https://reviews.llvm.org/D117250



More information about the llvm-commits mailing list