Skip to content

Commit

Permalink
Fix OSX debugging (dotnet#23924)
Browse files Browse the repository at this point in the history
A recent change has incorrectly added dependency on libcoreclrpal.a to
libutilcodenohost.a. This in turn, due to the transitive propagation of
dependencies, caused the libmscordbi to be linked with libcoreclrpal.a.
So libmscordbi contained its own PAL after that change, which is wrong.
libmscordbi should depend on PAL APIs through libmscordaccore that
exports the symbols it needs for it in order to keep just one PAL in the
process.

The fix is to remove the libcoreclrpal.a dependency and export few
new symbols from libmscordaccore instead.
  • Loading branch information
janvorli authored and hoyosjs committed Apr 12, 2019
1 parent 9749601 commit 2573e4e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 4 additions & 0 deletions src/dlls/mscordac/mscordac_unixexports.src
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ nativeStringResourceTable_mscorrc_debug
#PAL__flushall
#PAL_free
#PAL_fwprintf
#PAL_GetLogicalCpuCountFromOS
#PAL_GetNumaProcessorNode
#PAL_GetPALDirectoryW
#PAL_GetResourceString
#PAL_get_stdout
Expand Down Expand Up @@ -122,6 +124,7 @@ nativeStringResourceTable_mscorrc_debug
#GetLastError
#GetLongPathNameW
#GetModuleFileNameW
#GetNumaHighestNodeNumber
#GetProcAddress
#GetProcessHeap
#GetShortPathNameW
Expand Down Expand Up @@ -178,6 +181,7 @@ nativeStringResourceTable_mscorrc_debug
#TlsGetValue
#TlsSetValue
#VirtualAlloc
#VirtualAllocExNuma
#VirtualFree
#VirtualProtect
#VirtualQuery
Expand Down
3 changes: 0 additions & 3 deletions src/utilcode/staticnohost/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,4 @@ add_library_clr(utilcodestaticnohost STATIC ${UTILCODE_STATICNOHOST_SOURCES})

if(CLR_CMAKE_PLATFORM_UNIX)
target_link_libraries(utilcodestaticnohost nativeresourcestring)
if(CLR_CMAKE_PLATFORM_DARWIN)
target_link_libraries(utilcodestaticnohost coreclrpal)
endif(CLR_CMAKE_PLATFORM_DARWIN)
endif(CLR_CMAKE_PLATFORM_UNIX)

0 comments on commit 2573e4e

Please sign in to comment.