Instead of manually registering libraries as target_libraries in Polly, use the LINK_COMPONENTS option. It makes Polly's CMakefile easier to read, and generalizes https://reviews.llvm.org/D78332 to all plugins.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Unit Tests
Event Timeline
Comment Actions
Rebase this patch on https://reviews.llvm.org/D78192, which make sit much cleaner and straight-forward.
Comment Actions
I got a new warning when compiling with clang:
In file included from /tmp/persistent/llvm-src/llvm/tools/llvm-config/llvm-config.cpp:51: tools/llvm-config/ExtensionDependencies.inc:7:2: warning: suggest braces around initialization of subobject [-Wmissing-braces] {"Polly", {"support", "core", "scalaropts", "instcombine", "transformutils", "analysis", "ipo", "mc", "passes", "linker", "irreader", "analysis", "bitreader", "mcparser", "object", "profiledata", "target", "vectorize", "PollyISL", "Polly",nullptr}}, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { }
Comment Actions
This is my full compilation option, but I don't think anything other than -DBUILD_SHARED_LIBS=ON is relevant.
cmake -G Ninja -DCMAKE_C_COMPILER=$HOME/apps/clang+llvm/bin/clang -DCMAKE_CXX_COMPILER=$HOME/apps/clang+llvm/bin/clang++ -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DLLVM_TARGETS_TO_BUILD="X86;WebAssembly" -DLLVM_ENABLE_LIBCXX=ON -DLLVM_ENABLE_LLD=ON -DLLVM_ENABLE_ASSERTIONS=ON -DBUILD_SHARED_LIBS=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DLLVM_BUILD_TESTS=ON -DCMAKE_CXX_FLAGS="-D_GLIBCXX_DEBUG" -DLLVM_INSTALL_UTILS=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$HOME/llvm-git/install.debug -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra;compiler-rt;debuginfo-tests;libclc;libcxx;libcxxabi;libunwind;lld;lldb;openmp;parallel-libs;polly;pstl;test-suite" ../llvm
Comment Actions
@aheejin thanks! I was able to reproduce, https://reviews.llvm.org/D79295 should fix the issue, can you confirm that?