[Openmp-commits] [openmp] r309877 - Exclude version symbols for static libomp

Jonathan Peyton via Openmp-commits openmp-commits at lists.llvm.org
Wed Aug 2 13:10:00 PDT 2017


Author: jlpeyton
Date: Wed Aug  2 13:10:00 2017
New Revision: 309877

URL: http://llvm.org/viewvc/llvm-project?rev=309877&view=rev
Log:
Exclude version symbols for static libomp

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.

Patch by Olga Malysheva

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

Modified:
    openmp/trunk/runtime/CMakeLists.txt

Modified: openmp/trunk/runtime/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/CMakeLists.txt?rev=309877&r1=309876&r2=309877&view=diff
==============================================================================
--- openmp/trunk/runtime/CMakeLists.txt (original)
+++ openmp/trunk/runtime/CMakeLists.txt Wed Aug  2 13:10:00 2017
@@ -313,6 +313,11 @@ if(LIBOMP_USE_ITT_NOTIFY AND NOT LIBOMP_
   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?")




More information about the Openmp-commits mailing list