[Openmp-commits] [PATCH] D138002: [OpenMP][libomptarget] Build plugins-nextgen/common/PluginInterface with protected visibility

Kevin Sala Penadés via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Nov 14 18:47:08 PST 2022


kevinsala created this revision.
kevinsala added reviewers: jdoerfert, ggeorgakoudis, jhuber6, tianshilei1992.
kevinsala added a project: OpenMP.
Herald added subscribers: guansong, yaxunl.
Herald added a project: All.
kevinsala requested review of this revision.
Herald added subscribers: openmp-commits, sstefan1.

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 <https://reviews.llvm.org/D136365>.

Issue reported by @ggeorgakoudis.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D138002

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


Index: openmp/libomptarget/plugins-nextgen/common/PluginInterface/CMakeLists.txt
===================================================================
--- openmp/libomptarget/plugins-nextgen/common/PluginInterface/CMakeLists.txt
+++ openmp/libomptarget/plugins-nextgen/common/PluginInterface/CMakeLists.txt
@@ -20,6 +20,7 @@
 add_definitions(-DDEBUG_PREFIX="PluginInterface")
 
 set_property(TARGET PluginInterface PROPERTY POSITION_INDEPENDENT_CODE ON)
+set_property(TARGET PluginInterface PROPERTY CXX_VISIBILITY_PRESET protected)
 llvm_update_compile_flags(PluginInterface)
 set(LINK_LLVM_LIBS LLVMSupport)
 if (LLVM_LINK_LLVM_DYLIB)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D138002.475331.patch
Type: text/x-patch
Size: 635 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20221115/4651ef8b/attachment.bin>


More information about the Openmp-commits mailing list