[Openmp-commits] [openmp] c32022a - [OpenMP][libomp] Fix CMake version symbol testing

Jonathan Peyton via Openmp-commits openmp-commits at lists.llvm.org
Fri Feb 3 08:52:52 PST 2023


Author: Jonathan Peyton
Date: 2023-02-03T10:52:34-06:00
New Revision: c32022ad260aa1e6f485c5a6820fa9973f3b108e

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

LOG: [OpenMP][libomp] Fix CMake version symbol testing

Do not check for version symbol support if the necessary linker flag is
not supported.

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

Added: 
    

Modified: 
    openmp/runtime/cmake/config-ix.cmake
    openmp/runtime/src/exports_test_so.txt

Removed: 
    


################################################################################
diff  --git a/openmp/runtime/cmake/config-ix.cmake b/openmp/runtime/cmake/config-ix.cmake
index 8e76e66066a9..d0eda6d8ca39 100644
--- a/openmp/runtime/cmake/config-ix.cmake
+++ b/openmp/runtime/cmake/config-ix.cmake
@@ -246,7 +246,11 @@ endif()
 
 # Checking features
 # Check if version symbol assembler directives are supported
-libomp_check_version_symbols(LIBOMP_HAVE_VERSION_SYMBOLS)
+if (LIBOMP_HAVE_VERSION_SCRIPT_FLAG)
+  libomp_check_version_symbols(LIBOMP_HAVE_VERSION_SYMBOLS)
+else()
+  set(LIBOMP_HAVE_VERSION_SYMBOLS FALSE)
+endif()
 
 # Check if quad precision types are available
 if(CMAKE_C_COMPILER_ID STREQUAL "GNU")

diff  --git a/openmp/runtime/src/exports_test_so.txt b/openmp/runtime/src/exports_test_so.txt
index 912d160e7c06..c0a08e6d3b23 100644
--- a/openmp/runtime/src/exports_test_so.txt
+++ b/openmp/runtime/src/exports_test_so.txt
@@ -19,10 +19,6 @@ VERSION {
 
         *;         # All symbols as exported for testing.
 
-    local: # Non-exported symbols.
-
-        *;         # All other symbols are not exported.
-
 }; # VERSION
 
 # sets up GCC OMP_ version dependency chain


        


More information about the Openmp-commits mailing list