[cfe-dev] LInk with/without LLVM_ENABLE_ABI_BREAKING_CHECKS

Fangrui Song via cfe-dev cfe-dev at lists.llvm.org
Thu Sep 17 14:10:10 PDT 2020


On 2020-09-17, Andy via cfe-dev wrote:
>I want use clang sources in my project. Rrlease version is linked and
>running OK, but debug version need llvm/lib/Support/ABIBreak.cpp to link
>and has runtime errors. This errors I can avoid by modying
>HandleLLVMOptions.cmake by defining LLVM_ABI_BREAKING_CHECKS.
>I can link debug objects and run OK, but it is huge: link need about 14 GB
>memory and takes 3 minutes of time.
>It will be well - near all objects files compiled as release but some
>compiled as debug. This is main problem: after modyfuing cmake , release
>version need EnableABIBreakingChecks and has errors. How do mix world with
>enable check and disable check?

Hi Andy, mixing LLVM_ABI_BREAKING_CHECKS objects and non-LLVM_ABI_BREAKING_CHECKS objects is not supported.
Please check out https://llvm.org/docs/ProgrammersManual.html#abi-breaking-checks

More specifically, Error in LLVM_ABI_BREAKING_CHECKS mode has one
additional bit field. If you pass `Error` compiled without
LLVM_ABI_BREAKING_CHECKS (the bit is not set) to an object with
LLVM_ABI_BREAKING_CHECKS (which checks whether the bit is set), it will assuredly lead to failures.
Other frequently used types, e.g. ilist and DenseMap will have similar failures.


More information about the cfe-dev mailing list