Skip to content

Commit

Permalink
[Libomptarget] Build plugins-nextgen/common/PluginInterface with prot…
Browse files Browse the repository at this point in the history
…ected 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
  • Loading branch information
kevinsala authored and jhuber6 committed Nov 16, 2022
1 parent a92f5a0 commit 6bacbea
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -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)
Expand Down

0 comments on commit 6bacbea

Please sign in to comment.