Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 6a8aa71

Browse files
authored
Enable Ubuntu 18.04 build in release/1.0.0 (#17139)
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.
1 parent 2d2457a commit 6a8aa71

File tree

2 files changed

+26
-17
lines changed

2 files changed

+26
-17
lines changed

build.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,9 @@ isMSBuildOnNETCoreSupported()
270270
"ubuntu.16.10-x64")
271271
__isMSBuildOnNETCoreSupported=1
272272
;;
273+
"ubuntu.18.04-x64")
274+
__isMSBuildOnNETCoreSupported=1
275+
;;
273276
*)
274277
esac
275278
elif [ "$__HostOS" == "OSX" ]; then

src/ToolBox/SOS/lldbplugin/CMakeLists.txt

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -42,40 +42,46 @@ if(NOT ENABLE_LLDBPLUGIN)
4242
endif()
4343

4444
# Check for LLDB library
45-
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)
46-
find_library(LLDB NAMES LLDB lldb lldb-4.0 lldb-3.8 lldb-3.7 lldb-3.6 lldb-3.5 PATH_SUFFIXES llvm)
45+
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)
46+
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)
4747
if(LLDB STREQUAL LLDB-NOTFOUND)
4848
if(REQUIRE_LLDBPLUGIN)
4949
set(MESSAGE_MODE FATAL_ERROR)
5050
else()
5151
set(MESSAGE_MODE WARNING)
5252
endif()
53-
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)")
53+
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)")
5454
return()
5555
endif()
5656

5757
message(STATUS "LLDB: ${LLDB}")
5858

5959
# Check for LLDB headers
6060

61+
# Multiple versions of LLDB can install side-by-side, so we need to check for lldb in various locations.
62+
# 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.
6163
find_path(LLDB_H "lldb/API/LLDB.h" PATHS "${WITH_LLDB_INCLUDES}" NO_DEFAULT_PATH)
6264
find_path(LLDB_H "lldb/API/LLDB.h")
65+
find_path(LLDB_H "lldb/API/LLDB.h" PATHS "/usr/lib/llvm-5.0/include")
66+
find_path(LLDB_H "lldb/API/LLDB.h" PATHS "/usr/lib/llvm-4.0/include")
67+
find_path(LLDB_H "lldb/API/LLDB.h" PATHS "/usr/lib/llvm-6.0/include")
68+
find_path(LLDB_H "lldb/API/LLDB.h" PATHS "/usr/lib/llvm-3.9/include")
69+
find_path(LLDB_H "lldb/API/LLDB.h" PATHS "/usr/lib/llvm-3.8/include")
70+
find_path(LLDB_H "lldb/API/LLDB.h" PATHS "/usr/lib/llvm-3.7/include")
71+
find_path(LLDB_H "lldb/API/LLDB.h" PATHS "/usr/lib/llvm-3.6/include")
72+
find_path(LLDB_H "lldb/API/LLDB.h" PATHS "/usr/lib/llvm-3.5/include")
73+
#FreeBSD
74+
find_path(LLDB_H "lldb/API/LLDB.h" PATHS "/usr/local/llvm39/include")
75+
find_path(LLDB_H "lldb/API/LLDB.h" PATHS "/usr/local/llvm38/include")
76+
6377
if(LLDB_H STREQUAL LLDB_H-NOTFOUND)
64-
find_path(LLDB_H "lldb/API/LLDB.h" PATHS "/usr/lib/llvm-3.8/include")
65-
if(LLDB_H STREQUAL LLDB_H-NOTFOUND)
66-
find_path(LLDB_H "lldb/API/LLDB.h" PATHS "/usr/lib/llvm-3.6/include")
67-
if(LLDB_H STREQUAL LLDB_H-NOTFOUND)
68-
find_path(LLDB_H "lldb/API/LLDB.h" PATHS "/usr/lib/llvm-3.5/include")
69-
if(LLDB_H STREQUAL LLDB_H-NOTFOUND)
70-
if(REQUIRE_LLDBPLUGIN)
71-
message(FATAL_ERROR "Cannot find LLDB.h. Try installing lldb-3.6-dev (or the appropriate package for your platform)")
72-
else()
73-
message(WARNING "Cannot find LLDB.h Try installing lldb-3.6-dev (or the appropriate package for your platform)")
74-
endif()
75-
return()
76-
endif()
77-
endif()
78+
if(REQUIRE_LLDBPLUGIN)
79+
set(MESSAGE_MODE FATAL_ERROR)
80+
else()
81+
set(MESSAGE_MODE WARNIG)
7882
endif()
83+
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.")
84+
return()
7985
endif()
8086

8187
message(STATUS "LLDB_H: ${LLDB_H}")

0 commit comments

Comments
 (0)