From 6bacbea82609a059496618a121b15f86a1f67f60 Mon Sep 17 00:00:00 2001 From: Kevin Sala Date: Wed, 16 Nov 2022 07:11:00 -0600 Subject: [PATCH] [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 --- .../plugins-nextgen/common/PluginInterface/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/openmp/libomptarget/plugins-nextgen/common/PluginInterface/CMakeLists.txt b/openmp/libomptarget/plugins-nextgen/common/PluginInterface/CMakeLists.txt index d3f4fcf1759e..60aeff8796fc 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)