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
llvm-svn: 309877
diff --git a/openmp/runtime/CMakeLists.txt b/openmp/runtime/CMakeLists.txt
index 29e1584..d605c37 100644
--- a/openmp/runtime/CMakeLists.txt
+++ b/openmp/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?")