Make the SONAME of the monolithic libLLVM
configurable. This is part of enabling the creation
of libraries with consistent names between old
autotools-based builds, and new CMake builds.
This diff does not change the current naming
scheme, but it would be trivial to do so later.
This is in response to
https://llvm.org/bugs/show_bug.cgi?id=25059, and
also to enable Debian's LLVM packaging to move to
CMake.
llvm_add_library now has SOVERSION and VERSION
options, which, if non-empty and not equal to "cmake-default",
will be set as properties on shared library targets.
The "cmake-default" special case is due to empty string
arguments not resulting in variables defined. This allows us
to have:
(a) defaults if SOVERSION/VERSION are unspecified (i.e. existing MAJOR.MINOR for SOVERSION, etc.)
(b) a means of using the CMake-default SOVERSION/VERSION (i.e. by passing "cmake-default")
There are two new user-configurable options:
LLVM_DYLIB_SOVERSION (defaults to $MAJOR.$MINOR) LLVM_DYLIB_VERSION (defaults to $PACKAGE_VERSION)
A follow-up will introduce configuration for the name of
the libLLVM shared library.