The LLVM_ABI_REVISION variable is intended to be used for release
candidates which introduce an ABI change to a shared library. This
variable can be specified per library, so there is not one global value
for all of LLVM.
For example, if we LLVM X.0.0-rc2 introduces an ABI change for a library
compared with LLVM X.0.0-rc1, then the LLVM_ABI_REVISION number for
library will be incremented by 1.
In the main branch, LLVM_ABI_REVISION should always be 0, it is only
meant to be used in the release branch.
This comment is a bit misleading: should it be for each RC *or* for each RC that implies an ABI change? And what about the (very rare) minor version release, like 11.1.0? My understanding is that they implie an SONAME bump, maybe that should be stated somewhere?
I think it would be great to have that ABI policy documented somewhere in the official doc, and not only as a cmake comment, as every project linking with clang or llvm is impacted.