From e6e862360a4fd5a790bd5502519a6abc155bfde4 Mon Sep 17 00:00:00 2001 From: Jan Vorlicek Date: Fri, 23 Mar 2018 02:07:09 +0100 Subject: [PATCH] Enable Ubuntu 18.04 build in release/1.0.0 Also update the lldb versions in the src/ToolBox/SOS/lldbplugin/CMakeLists.txt to the full current list the same way we have it in master. --- build.sh | 3 ++ src/ToolBox/SOS/lldbplugin/CMakeLists.txt | 40 +++++++++++++---------- 2 files changed, 26 insertions(+), 17 deletions(-) diff --git a/build.sh b/build.sh index 0b83232e60c1..4f1dac0f52ac 100755 --- a/build.sh +++ b/build.sh @@ -270,6 +270,9 @@ isMSBuildOnNETCoreSupported() "ubuntu.16.10-x64") __isMSBuildOnNETCoreSupported=1 ;; + "ubuntu.18.04-x64") + __isMSBuildOnNETCoreSupported=1 + ;; *) esac elif [ "$__HostOS" == "OSX" ]; then diff --git a/src/ToolBox/SOS/lldbplugin/CMakeLists.txt b/src/ToolBox/SOS/lldbplugin/CMakeLists.txt index a6f52f5fc063..cfa7e10630fa 100644 --- a/src/ToolBox/SOS/lldbplugin/CMakeLists.txt +++ b/src/ToolBox/SOS/lldbplugin/CMakeLists.txt @@ -42,15 +42,15 @@ if(NOT ENABLE_LLDBPLUGIN) 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.8 lldb-3.7 lldb-3.6 lldb-3.5 PATH_SUFFIXES llvm) +find_library(LLDB NAMES LLDB lldb lldb-6.0 lldb-5.0 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-6.0 lldb-5.0 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)") + message(${MESSAGE_MODE} "Cannot find lldb-3.5, lldb-3.6, lldb-3.8, lldb-3.9, lldb-4.0, lldb-5.0 or lldb-6.0. Try installing lldb-3.6-dev (or the appropriate package for your platform)") return() endif() @@ -58,24 +58,30 @@ message(STATUS "LLDB: ${LLDB}") # Check for LLDB headers +# Multiple versions of LLDB can install side-by-side, so we need to check for lldb in various locations. +# If the file in a directory is found the result is stored in the variable and the search will not be repeated unless the variable is cleared. find_path(LLDB_H "lldb/API/LLDB.h" PATHS "${WITH_LLDB_INCLUDES}" NO_DEFAULT_PATH) find_path(LLDB_H "lldb/API/LLDB.h") +find_path(LLDB_H "lldb/API/LLDB.h" PATHS "/usr/lib/llvm-5.0/include") +find_path(LLDB_H "lldb/API/LLDB.h" PATHS "/usr/lib/llvm-4.0/include") +find_path(LLDB_H "lldb/API/LLDB.h" PATHS "/usr/lib/llvm-6.0/include") +find_path(LLDB_H "lldb/API/LLDB.h" PATHS "/usr/lib/llvm-3.9/include") +find_path(LLDB_H "lldb/API/LLDB.h" PATHS "/usr/lib/llvm-3.8/include") +find_path(LLDB_H "lldb/API/LLDB.h" PATHS "/usr/lib/llvm-3.7/include") +find_path(LLDB_H "lldb/API/LLDB.h" PATHS "/usr/lib/llvm-3.6/include") +find_path(LLDB_H "lldb/API/LLDB.h" PATHS "/usr/lib/llvm-3.5/include") +#FreeBSD +find_path(LLDB_H "lldb/API/LLDB.h" PATHS "/usr/local/llvm39/include") +find_path(LLDB_H "lldb/API/LLDB.h" PATHS "/usr/local/llvm38/include") + if(LLDB_H STREQUAL LLDB_H-NOTFOUND) - find_path(LLDB_H "lldb/API/LLDB.h" PATHS "/usr/lib/llvm-3.8/include") - if(LLDB_H STREQUAL LLDB_H-NOTFOUND) - find_path(LLDB_H "lldb/API/LLDB.h" PATHS "/usr/lib/llvm-3.6/include") - if(LLDB_H STREQUAL LLDB_H-NOTFOUND) - find_path(LLDB_H "lldb/API/LLDB.h" PATHS "/usr/lib/llvm-3.5/include") - if(LLDB_H STREQUAL LLDB_H-NOTFOUND) - if(REQUIRE_LLDBPLUGIN) - message(FATAL_ERROR "Cannot find LLDB.h. Try installing lldb-3.6-dev (or the appropriate package for your platform)") - else() - message(WARNING "Cannot find LLDB.h Try installing lldb-3.6-dev (or the appropriate package for your platform)") - endif() - return() - endif() - endif() + if(REQUIRE_LLDBPLUGIN) + set(MESSAGE_MODE FATAL_ERROR) + else() + set(MESSAGE_MODE WARNIG) endif() + message(${MESSAGE_MODE} "Cannot find LLDB.h Try installing lldb-3.6-dev (or the appropriate package for your platform). You may need to set LLVM_HOME if the build still can't find it.") + return() endif() message(STATUS "LLDB_H: ${LLDB_H}")