[polly] r228914 - Link LLVM libraries into libLLVMPolly if BUILD_SHARED_LIBS=ON is set
brad.king at kitware.com
Mon Feb 16 06:06:54 PST 2015
On 02/14/2015 11:47 AM, Tobias Grosser wrote:
> To my understanding, the LLVM libraries are now linked into libPolly.a
There is no such thing as being "linked into" a static library.
They do not really link. When CMake sees target_link_libraries
called for a static library it simply records the specified
libraries as dependencies of the static library. Anything that
links to the static library will also link to its dependencies
to satisfy symbol dependencies of the static library itself when
used by its dependents.
> and when loading libLLVMPolly.so e.g. into clang or opt, certain static
> globals are defined twice (once hidden in Polly and once in clang/opt
> itself). As such symbols register themselves, this causes problems.
Please explain which libraries are shared and which libraries are
static in the cases of BUILD_SHARED_LIBS set to ON or OFF in your
use case. Also, in each case how is the executable linked?
More information about the llvm-commits