[cfe-dev] LInk with/without LLVM_ENABLE_ABI_BREAKING_CHECKS

David Blaikie via cfe-dev cfe-dev at lists.llvm.org
Thu Sep 17 15:19:53 PDT 2020


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


More information about the cfe-dev mailing list