[Openmp-commits] [openmp] 6bacbea - [Libomptarget] Build plugins-nextgen/common/PluginInterface with protected visibility

Joseph Huber via Openmp-commits openmp-commits at lists.llvm.org
Wed Nov 16 05:12:07 PST 2022


Author: Kevin Sala
Date: 2022-11-16T07:11:38-06:00
New Revision: 6bacbea82609a059496618a121b15f86a1f67f60

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

LOG: [Libomptarget] Build plugins-nextgen/common/PluginInterface with protected visibility

Summary:
This commit sets the default visibility of PluginInterface's symbols (in
nextgen plugins) as protected. This prevents symbols from a plugin
library to be preempted by another plugin library's symbol. It applies
the same fix introduced by D136365.

Issue reported by @ggeorgakoudis.

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

Added: 
    

Modified: 
    openmp/libomptarget/plugins-nextgen/common/PluginInterface/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/openmp/libomptarget/plugins-nextgen/common/PluginInterface/CMakeLists.txt b/openmp/libomptarget/plugins-nextgen/common/PluginInterface/CMakeLists.txt
index d3f4fcf1759eb..60aeff8796fc7 100644
--- a/openmp/libomptarget/plugins-nextgen/common/PluginInterface/CMakeLists.txt
+++ b/openmp/libomptarget/plugins-nextgen/common/PluginInterface/CMakeLists.txt
@@ -19,7 +19,9 @@ add_definitions("-DTARGET_NAME=PluginInterface")
 # Define the DEBUG_PREFIX.
 add_definitions(-DDEBUG_PREFIX="PluginInterface")
 
-set_property(TARGET PluginInterface PROPERTY POSITION_INDEPENDENT_CODE ON)
+set_target_properties(PluginInterface PROPERTIES
+  POSITION_INDEPENDENT_CODE ON
+  CXX_VISIBILITY_PRESET protected)
 llvm_update_compile_flags(PluginInterface)
 set(LINK_LLVM_LIBS LLVMSupport)
 if (LLVM_LINK_LLVM_DYLIB)


        


More information about the Openmp-commits mailing list