Skip to content

Commit

Permalink
SPMI: Export dynamic symbols in superpmi for unix builds (#85967)
Browse files Browse the repository at this point in the history
This is necessary for Instrumentor_GetInsCount to get a public symbol
that pin can find.
  • Loading branch information
jakobbotsch authored May 9, 2023
1 parent 66b8aaf commit 4fba42e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/coreclr/tools/superpmi/superpmi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@ if(CLR_CMAKE_HOST_WIN32)
set(CMAKE_MSVC_RUNTIME_LIBRARY MultiThreaded)
endif(CLR_CMAKE_HOST_WIN32)

if(CLR_CMAKE_HOST_UNIX)
# Make sure a public symbol is created for Instrumentor_GetInsCount
if(CLR_CMAKE_HOST_APPLE)
add_linker_flag(-Wl,-export_dynamic)
else()
add_linker_flag(-Wl,--export-dynamic)
endif(CLR_CMAKE_HOST_APPLE)
endif(CLR_CMAKE_HOST_UNIX)

include_directories(.)
include_directories(../superpmi-shared)

Expand Down

0 comments on commit 4fba42e

Please sign in to comment.