Skip to content

Commit

Permalink
Fix multiple version strings in coreclr shared libraries (#41711)
Browse files Browse the repository at this point in the history
We were incorrectly adding the version.c source to all coreclr
libraries and not just the shared ones. That caused multiple
occurences of the version string in coreclr shared libraries
composed of sublibraries.
This change fixes it by adding that source file for shared
libraries only.
I've also discovered that libcoreclrtraceptprovider.so was
missing the version string completely, so I've added it there.
  • Loading branch information
janvorli authored Sep 2, 2020
1 parent cfd6030 commit a664bbc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions eng/native/functions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -439,11 +439,11 @@ function(_add_executable)
endfunction()

function(_add_library)
if(NOT WIN32)
if(NOT WIN32 AND "${ARGV1}" STREQUAL "SHARED")
add_library(${ARGV} ${VERSION_FILE_PATH})
else()
add_library(${ARGV})
endif(NOT WIN32)
endif(NOT WIN32 AND "${ARGV1}" STREQUAL "SHARED")
list(FIND CLR_CROSS_COMPONENTS_LIST ${ARGV0} INDEX)
if (DEFINED CLR_CROSS_COMPONENTS_LIST AND ${INDEX} EQUAL -1)
set_target_properties(${ARGV0} PROPERTIES EXCLUDE_FROM_ALL 1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ add_library(eventprovider
add_library(coreclrtraceptprovider
SHARED
${TRACEPOINT_PROVIDER_SOURCES}
${VERSION_FILE_PATH}
)

add_dependencies(eventprovider generated_eventing_headers)
Expand Down

0 comments on commit a664bbc

Please sign in to comment.