summaryrefslogtreecommitdiff
path: root/src/ToolBox
diff options
context:
space:
mode:
authorMike McLaughlin <mikem@microsoft.com>2017-06-06 23:53:15 -0700
committerGitHub <noreply@github.com>2017-06-06 23:53:15 -0700
commiteb852b90f11fca0ab1f5ff4cc76ad298650d4d5e (patch)
treeeda4b5f4b74e3fbed2f0ea8bac5caee3844915ff /src/ToolBox
parentfe246f4d1f60d09925858cccd14d8300febd3c7f (diff)
downloadcoreclr-eb852b90f11fca0ab1f5ff4cc76ad298650d4d5e.tar.gz
coreclr-eb852b90f11fca0ab1f5ff4cc76ad298650d4d5e.tar.bz2
coreclr-eb852b90f11fca0ab1f5ff4cc76ad298650d4d5e.zip
Fix portable build sos plugin problems (#12125)
* Fix portable build sos plugin problems. Removing the explicit reference to liblldb. Since the lldb program has already loaded this lib, our will now load regardless of the distro and version of lldb. Issue #12098. * Fix OSX build.
Diffstat (limited to 'src/ToolBox')
-rw-r--r--src/ToolBox/SOS/lldbplugin/CMakeLists.txt31
1 files changed, 16 insertions, 15 deletions
diff --git a/src/ToolBox/SOS/lldbplugin/CMakeLists.txt b/src/ToolBox/SOS/lldbplugin/CMakeLists.txt
index 9707e9effe..203c179e05 100644
--- a/src/ToolBox/SOS/lldbplugin/CMakeLists.txt
+++ b/src/ToolBox/SOS/lldbplugin/CMakeLists.txt
@@ -45,7 +45,6 @@ elseif(CLR_CMAKE_PLATFORM_ARCH_ARM64)
SET(REQUIRE_LLDBPLUGIN false)
endif()
-
set(LLVM_HOST_DIR "$ENV{LLVM_HOME}")
set(WITH_LLDB_LIBS "${LLVM_HOST_DIR}/lib" CACHE PATH "Path to LLDB libraries")
set(WITH_LLDB_INCLUDES "${LLVM_HOST_DIR}/include" CACHE PATH "Path to LLDB headers")
@@ -54,20 +53,22 @@ if(NOT ENABLE_LLDBPLUGIN)
return()
endif()
-# Check for LLDB library
-find_library(LLDB NAMES LLDB lldb lldb-4.0 lldb-3.9 lldb-3.8 lldb-3.7 lldb-3.6 lldb-3.5 PATHS "${WITH_LLDB_LIBS}" PATH_SUFFIXES llvm NO_DEFAULT_PATH)
-find_library(LLDB NAMES LLDB lldb lldb-4.0 lldb-3.9 lldb-3.8 lldb-3.7 lldb-3.6 lldb-3.5 PATH_SUFFIXES llvm)
-if(LLDB STREQUAL LLDB-NOTFOUND)
- if(REQUIRE_LLDBPLUGIN)
- set(MESSAGE_MODE FATAL_ERROR)
- else()
- set(MESSAGE_MODE WARNING)
+if (CLR_CMAKE_PLATFORM_DARWIN)
+ # Check for LLDB library
+ find_library(LLDB NAMES LLDB lldb lldb-4.0 lldb-3.9 lldb-3.8 lldb-3.7 lldb-3.6 lldb-3.5 PATHS "${WITH_LLDB_LIBS}" PATH_SUFFIXES llvm NO_DEFAULT_PATH)
+ find_library(LLDB NAMES LLDB lldb lldb-4.0 lldb-3.9 lldb-3.8 lldb-3.7 lldb-3.6 lldb-3.5 PATH_SUFFIXES llvm)
+ if(LLDB STREQUAL LLDB-NOTFOUND)
+ if(REQUIRE_LLDBPLUGIN)
+ set(MESSAGE_MODE FATAL_ERROR)
+ else()
+ set(MESSAGE_MODE WARNING)
+ endif()
+ message(${MESSAGE_MODE} "Cannot find lldb-3.5, lldb-3.6, lldb-3.8, lldb-3.9 or lldb-4.0. Try installing lldb-3.6-dev (or the appropriate package for your platform)")
+ return()
endif()
- message(${MESSAGE_MODE} "Cannot find lldb-3.5, lldb-3.6, lldb-3.8, lldb-3.9 or lldb-4.0. Try installing lldb-3.6-dev (or the appropriate package for your platform)")
- return()
-endif()
-message(STATUS "LLDB: ${LLDB}")
+ message(STATUS "LLDB: ${LLDB}")
+endif()
# Check for LLDB headers
# Multiple versions of LLDB can install side-by-side, so we need to check for lldb in various locations.
@@ -112,8 +113,8 @@ set(SOURCES
_add_library(sosplugin SHARED ${SOURCES})
add_dependencies(sosplugin sos)
-if (CLR_CMAKE_PLATFORM_UNIX)
- target_link_libraries(sosplugin ${LLDB})
+if (CLR_CMAKE_PLATFORM_DARWIN)
+ target_link_libraries(sosplugin ${LLDB})
endif()
# add the install targets