[cfe-dev] LInk with/without LLVM_ENABLE_ABI_BREAKING_CHECKS

Mehdi AMINI via cfe-dev cfe-dev at lists.llvm.org
Thu Sep 17 16:47:06 PDT 2020


In general, I believe that if you hit a missing symbol it means that you
are building your client against a version of the LLVM header with
the EnableABIBreakingChecks (respectively DisableABIBreakingChecks) and
then try to link against a binary LLVM that was built with
DisableABIBreakingChecks (or respectively EnableABIBreakingChecks).

If this is not the case, it'd be interesting to get more detailed
information about what you're doing exactly. Reproduction steps would be
ideal :)

-- 
Mehdi

On Thu, Sep 17, 2020 at 3:20 PM David Blaikie via cfe-dev <
cfe-dev at lists.llvm.org> wrote:

> On Thu, Sep 17, 2020 at 2:16 PM Andy via cfe-dev <cfe-dev at lists.llvm.org>
> wrote:
> >
> > Why sometimes is OK and not need link file llvm/lib/Support/ABIBreak.cpp
> and sometimes is error with linked this file (required
> EnableABIBreakingChecks or DisableABIBreakingChecks) In abi-breaking.h is:
> >
> > namespace llvm {
> > #if LLVM_ENABLE_ABI_BREAKING_CHECKS
> > extern int EnableABIBreakingChecks;
> > LLVM_HIDDEN_VISIBILITY
> > __attribute__((weak)) int *VerifyEnableABIBreakingChecks =
> >     &EnableABIBreakingChecks;
> > #else
> > extern int DisableABIBreakingChecks;
> > LLVM_HIDDEN_VISIBILITY
> > __attribute__((weak)) int *VerifyDisableABIBreakingChecks =
> >     &DisableABIBreakingChecks;
> > #endif
> > }
> >
> > Always is extern EnableABIBreakingChecks or DisableABIBreakingChecks,
> but if is OK, no need link ABIBreak.cpp.
>
> That's the purpose - you should not mix ABI breaking checks with
> non-ABI breaking checks, they are invalid to combine.
>
> >
> >
> > _______________________________________________
> > cfe-dev mailing list
> > cfe-dev at lists.llvm.org
> > https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20200917/9c7cb6d8/attachment.html>


More information about the cfe-dev mailing list