[polly] 15a3476 - [polly][unittests] Link DeLICMTests with libLLVMCore

Rainer Orth via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 28 12:59:11 PST 2022


Author: Rainer Orth
Date: 2022-01-28T21:58:40+01:00
New Revision: 15a3476f3f9462a3f9f057ec626e7eaee829ed2c

URL: https://github.com/llvm/llvm-project/commit/15a3476f3f9462a3f9f057ec626e7eaee829ed2c
DIFF: https://github.com/llvm/llvm-project/commit/15a3476f3f9462a3f9f057ec626e7eaee829ed2c.diff

LOG: [polly][unittests] Link DeLICMTests with libLLVMCore

A `-DBUILD_SHARED_LIBS=ON` build on Solaris/amd64 failed with

  Undefined                       first referenced
   symbol                             in file
  _ZNK4llvm3cfg6UpdateIPNS_10BasicBlockEE4dumpEv tools/polly/unittests/DeLICM/CMakeFiles/DeLICMTests.dir/DeLICMTest.cpp.o  (symbol belongs to implicit dependency /var/llvm/local-amd64-release-stage2-shared-A/bin/../lib/libLLVMCore.so.14git)
  ld: fatal: symbol referencing errors

Solaris `ld` requires to directly link with dependant libraries, so this
patch explicitly adds `libLLVMCore`.

Tested on `amd64-pc-solaris2.11` and `x86_64-pc-linux-gnu`.

Differential Revision: https://reviews.llvm.org/D118452

Added: 
    

Modified: 
    polly/unittests/DeLICM/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/polly/unittests/DeLICM/CMakeLists.txt b/polly/unittests/DeLICM/CMakeLists.txt
index d83c08a0a9076..e3e3062f4e818 100644
--- a/polly/unittests/DeLICM/CMakeLists.txt
+++ b/polly/unittests/DeLICM/CMakeLists.txt
@@ -1,3 +1,8 @@
+# Solaris ld requires this dependency to be made explicit for shared builds.
+set(LLVM_LINK_COMPONENTS
+  Core
+  )
+
 add_polly_unittest(DeLICMTests
   DeLICMTest.cpp
   )


        


More information about the llvm-commits mailing list