diff --git a/src/installer/corehost/cli/common.cmake b/src/installer/corehost/cli/common.cmake index 4cd09d3747b52..1bdf01527c186 100644 --- a/src/installer/corehost/cli/common.cmake +++ b/src/installer/corehost/cli/common.cmake @@ -32,6 +32,12 @@ if(CLR_CMAKE_TARGET_WIN32) list(APPEND SOURCES ${HEADERS}) endif() +# This is required to map a symbol reference to a matching definition local to the module (.so) +# containing the reference instead of using definitions from other modules. +if(CLR_CMAKE_TARGET_LINUX) + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Xlinker -Bsymbolic") +endif() + function(set_common_libs TargetType) # Libraries used for exe projects