[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
This commit is contained in:
Kevin Sala 2022-11-16 07:11:00 -06:00 committed by Joseph Huber
parent a92f5a08a1
commit 6bacbea826
1 changed files with 3 additions and 1 deletions

View File

@ -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)