diff options
author | Nico Weber <nicolasweber@gmx.de> | 2019-01-31 16:14:33 +0000 |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2019-01-31 16:14:33 +0000 |
commit | 9aa55d3c668cea6542d6cb746c51ac7038feefff (patch) | |
tree | a48d20b5778a2f2f356e8df74ea59415afc1dcf5 /llvm/lib/Transforms/Utils/ModuleUtils.cpp | |
parent | 00eaf6732e9f8e311603cfe97c913d052424cfaa (diff) | |
download | llvm-9aa55d3c668cea6542d6cb746c51ac7038feefff.zip llvm-9aa55d3c668cea6542d6cb746c51ac7038feefff.tar.gz llvm-9aa55d3c668cea6542d6cb746c51ac7038feefff.tar.bz2 |
lld-link: Allow mixing 'discard' and 'largest' comdat selections
cl.exe and clang-cl.exe put vftables in a 'discard' comdat when building with
RTTI disabled (/GR-) but in a 'largest' comdat when building with RTTI enabled.
To be able to link /GR- code with /GR code, lld-link needs to accept comdats
that have this type of comdat selection conflict.
For example, static libraries in the Visual Studio standard library are built
with /GR, and without this it's impossible to build client code with /GR- and
still link to the standard library.
link.exe also accepts merging 'discard' with 'largest', and it accepts merging
'largest' with any other selection type. lld-link is still a bit stricter since
it only allows merging 'largest' with 'discard' for symmetry.
Differential Revision: https://reviews.llvm.org/D57515
llvm-svn: 352765
Diffstat (limited to 'llvm/lib/Transforms/Utils/ModuleUtils.cpp')
0 files changed, 0 insertions, 0 deletions