From a664bbc7b6b42a88bf3597834f620a41be8fcee5 Mon Sep 17 00:00:00 2001 From: Jan Vorlicek Date: Wed, 2 Sep 2020 10:51:44 +0200 Subject: Fix multiple version strings in coreclr shared libraries (#41711) 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. --- eng/native/functions.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'eng/native/functions.cmake') diff --git a/eng/native/functions.cmake b/eng/native/functions.cmake index 1509a17fa59..1bdcf1ddd38 100644 --- a/eng/native/functions.cmake +++ b/eng/native/functions.cmake @@ -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) -- cgit v1.2.3