From: Geoff Norton Date: Sat, 21 Feb 2015 01:16:31 +0000 (-0800) Subject: Fix SOS command to not break the OSX build, and be linkable against apples LLDB.framework X-Git-Tag: accepted/tizen/base/20180629.140029~7058^2~6^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4e8cd5ee8da64c5da67f53ac0b9d6f349c52aa8c;p=platform%2Fupstream%2Fcoreclr.git Fix SOS command to not break the OSX build, and be linkable against apples LLDB.framework --- diff --git a/src/ToolBox/SOS/lldbplugin/CMakeLists.txt b/src/ToolBox/SOS/lldbplugin/CMakeLists.txt index 78046ec..614e982 100644 --- a/src/ToolBox/SOS/lldbplugin/CMakeLists.txt +++ b/src/ToolBox/SOS/lldbplugin/CMakeLists.txt @@ -21,7 +21,6 @@ if((NOT ${LLDB_INCLUDE_DIR} STREQUAL "") AND (NOT ${LLDB_LIB_DIR} STREQUAL "")) include_directories(inc) include_directories("${LLDB_INCLUDE_DIR}") - link_directories("${LLDB_LIB_DIR}") set(SOURCES sosplugin.cpp @@ -32,6 +31,15 @@ if((NOT ${LLDB_INCLUDE_DIR} STREQUAL "") AND (NOT ${LLDB_LIB_DIR} STREQUAL "")) add_library(sosplugin SHARED ${SOURCES}) add_dependencies(sosplugin sos) + if(CLR_CMAKE_PLATFORM_LINUX) + link_directories("${LLDB_LIB_DIR}") + endif(CLR_CMAKE_PLATFORM_LINUX) + + if(CLR_CMAKE_PLATFORM_DARWIN) + find_library(LLDB LLDB PATHS ${LLDB_LIB_DIR}) + target_link_libraries(sosplugin ${LLDB}) + endif(CLR_CMAKE_PLATFORM_DARWIN) + # add the install targets install (TARGETS sosplugin DESTINATION .) -endif() \ No newline at end of file +endif() diff --git a/src/dlls/mscordac/CMakeLists.txt b/src/dlls/mscordac/CMakeLists.txt index fc0836f..8e11906 100644 --- a/src/dlls/mscordac/CMakeLists.txt +++ b/src/dlls/mscordac/CMakeLists.txt @@ -30,14 +30,16 @@ if(WIN32) set(START_LIBRARY_GROUP) set(END_LIBRARY_GROUP) else(WIN32) - # This option is necessary to ensure that the overloaded delete operator defined inside - # of the utilcode will be used instead of the standard library delete operator. - set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Xlinker -Bsymbolic-functions") - - # The following linked options can be inserted into the linker libraries list to - # ensure proper resolving of circular references between a subset of the libraries. - set(START_LIBRARY_GROUP -Wl,--start-group) - set(END_LIBRARY_GROUP -Wl,--end-group) + if(CLR_CMAKE_PLATFORM_LINUX) + # This option is necessary to ensure that the overloaded delete operator defined inside + # of the utilcode will be used instead of the standard library delete operator. + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Xlinker -Bsymbolic-functions") + + # The following linked options can be inserted into the linker libraries list to + # ensure proper resolving of circular references between a subset of the libraries. + set(START_LIBRARY_GROUP -Wl,--start-group) + set(END_LIBRARY_GROUP -Wl,--end-group) + endif(CLR_CMAKE_PLATFORM_LINUX) endif(WIN32) add_library(mscordaccore SHARED ${CLR_DAC_SOURCES})