[Openmp-commits] [PATCH] D36225: Exclude version symbols for static libomp

Olga Malysheva via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Wed Aug 2 08:50:39 PDT 2017


omalyshe created this revision.
Herald added a subscriber: mgorny.

We use symbol versioning for GNU-compatibility but libgomp has versioned symbols only in the shared library but not in the static.

Moreover, version symbols in the static library can cause an error at link time.


Repository:
  rL LLVM

https://reviews.llvm.org/D36225

Files:
  runtime/CMakeLists.txt


Index: runtime/CMakeLists.txt
===================================================================
--- runtime/CMakeLists.txt
+++ runtime/CMakeLists.txt
@@ -313,6 +313,11 @@
   set(LIBOMP_USE_ITT_NOTIFY FALSE)
 endif()
 
+if(LIBOMP_USE_VERSION_SYMBOLS AND (NOT LIBOMP_ENABLE_SHARED) )
+  message(STATUS "Version symbols not supported for static libraries - forcing Version symbols functionality off")
+  set (LIBOMP_USE_VERSION_SYMBOLS FALSE)
+endif()
+
 # OMPT-support
 set(LIBOMP_OMPT_DEBUG FALSE CACHE BOOL
   "Trace OMPT initialization?")


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D36225.109359.patch
Type: text/x-patch
Size: 542 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20170802/be4fbbd5/attachment.bin>


More information about the Openmp-commits mailing list