Hi,
I tried which build configurations for Polly currently work and which don't which what reason. I thought this might be useful information to see whether new patches (such as D51963) regress and/or to know what needs to be fixed. The version of LLVM/Polly used is r342650. I looked at 18 different build configurations.
Legend:
|
All test pass |
|
Partially works |
|
Doesn’t work |
GNU/WSL
|
LLVM_POLLY_LINK_INTO_TOOLS=1 |
LLVM_POLLY_LINK_INTO_TOOLS=0 |
Out-of-source-tree |
Static link |
|
(1) |
(1) |
BUILD_SHARED_LIBS=1 |
|
|
(2) |
LLVM_LINK_LLVM_DYLIB=1 |
|
|
|
Windows (msvc)
|
LLVM_POLLY_LINK_INTO_TOOLS=1 |
LLVM_POLLY_LINK_INTO_TOOLS=0 |
Out-of-source-tree |
Static link |
|
(3) |
|
BUILD_SHARED_LIBS=1 |
(4) |
||
LLVM_LINK_LLVM_DYLIB=1 |
(5) |
(1) opt: symbol lookup error: /home/meinersbur/build/polly/release_static/lib/LLVMPolly.so: undefined symbol: _ZN4llvm4json5parseENS_9StringRefE
The JSON parser is not used in LLVM, so the symbols from Support/JSON.cpp are not in the opt executable.
JSON is only needed for some regression tests, the others work.
(2) Undefined references to gtest when
linking unit tests
but “opt -load LLVMPolly.so” works
(3) -load mechanism cannot work on windows since library imports need to specify which library they are importing from (so LLVMPolly.so would need to know whether e.g. it is loaded into opt or clang)
(4) LINK : fatal error LNK1181: cannot open input file 'lib\LLVMDemangle.lib'
Not supported according to http://lists.llvm.org/pipermail/llvm-dev/2018-September/126173.html
(5) CMake Error at tools/llvm-shlib/CMakeLists.txt:15 (message):
Generating libLLVM is not supported on MSVC
Michael
Works | ||||
partially works | ||||
broken | ||||
Linux | ||||
LLVM_POLLY_LINK_INTO_TOOLS=1 | LLVM_POLLY_LINK_INTO_TOOLS=0 | Out-of-source-tree: builddir | Out-of-source-tree: installdir | |
Static link | (1) | (1) | (1) | |
BUILD_SHARED_LIBS=1 | (2) | |||
LLVM_LINK_LLVM_DYLIB=1 |
(1) Failing Tests (1): Polly :: GPGPU/libdevice-functions-copied-into-kernel.ll GPGPU/libdevice-functions-copied-into-kernel.ll fails: LLVMPolly.so: undefined symbol: _ZN4llvm6LinkerC1ERNS_6ModuleE The llvm::Linker class is not used inside opt, such that the object file LinkModules.o is not included in the opt executable. A fix is available here: https://reviews.llvm.org/D65295 |
(2) |
Undefined references to gtest when linking unit
tests |
However, "clang -Xclang -load -Xclang LLVMPolly.so" works Michael |