Skip to content

Commit

Permalink
Fix host linker options to have -Bsymbolic (#34534) (#34570)
Browse files Browse the repository at this point in the history
* Fix host linker options to have -Bsymbolic

* Remove -Bsymbolic-functions

Co-authored-by: Elinor Fung <47805090+elinor-fung@users.noreply.github.com>
  • Loading branch information
mmitche and elinor-fung committed Apr 6, 2020
1 parent 8f6b899 commit d546de7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/installer/corehost/cli/common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d546de7

Please sign in to comment.