[cfe-dev] LInk with/without LLVM_ENABLE_ABI_BREAKING_CHECKS

Andy via cfe-dev cfe-dev at lists.llvm.org
Thu Sep 17 14:16:44 PDT 2020


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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20200917/d08d294c/attachment.html>


More information about the cfe-dev mailing list