diff options
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rwxr-xr-x | build.sh | 22 | ||||
-rw-r--r-- | src/ToolBox/SOS/lldbplugin/CMakeLists.txt | 11 |
3 files changed, 30 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 8f77b5f783..6b4a9a4a95 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,7 +35,7 @@ OPTION(CLR_CMAKE_ENABLE_CODE_COVERAGE "Enable code coverage" OFF) OPTION(CLR_CMAKE_WARNINGS_ARE_ERRORS "Warnings are errors" ON) # Ensure that python is present -find_program(PYTHON python) +find_program(PYTHON NAMES python2.7 python2 python) if (PYTHON STREQUAL "PYTHON-NOTFOUND") message(FATAL_ERROR "PYTHON not found: Please install Python 2.7.9 or later from https://www.python.org/downloads/") endif() @@ -2,7 +2,7 @@ # resolve python-version to use if [ "$PYTHON" == "" ] ; then - if ! PYTHON=$(command -v python || command -v python2 || command -v python 2.7) + if ! PYTHON=$(command -v python2.7 || command -v python2 || command -v python) then echo "Unable to locate build-dependency python2.x!" 1>&2 exit 1 @@ -74,6 +74,10 @@ initHostDistroRid() fi fi fi + if [ "$__HostOS" == "FreeBSD" ]; then + __freebsd_version=`sysctl -n kern.osrelease | cut -f1 -d'.'` + __HostDistroRid="freebsd.$__freebsd_version-$__HostArch" + fi if [ "$__HostDistroRid" == "" ]; then echo "WARNING: Can not determine runtime id for current distro." @@ -107,6 +111,8 @@ initTargetDistroRid() export __DistroRid="linux-$__BuildArch" elif [ "$__BuildOS" == "OSX" ]; then export __DistroRid="osx-$__BuildArch" + elif [ "$__BuildOS" == "FreeBSD" ]; then + export __DistroRid="freebsd-$__BuildArch" fi fi } @@ -553,6 +559,10 @@ case $CPUName in __HostArch=arm64 ;; + amd64) + __BuildArch=x64 + __HostArch=x64 + ;; *) echo "Unknown CPU $CPUName detected, configuring as if for x64" __BuildArch=x64 @@ -860,6 +870,16 @@ while :; do exit 1 fi ;; + osgroup|-osgroup) + if [ -n "$2" ]; then + __BuildOS="$2" + shift + else + echo "ERROR: 'osgroup' requires a non-empty option argument" + exit 1 + fi + ;; + *) __UnprocessedBuildArgs="$__UnprocessedBuildArgs $1" ;; diff --git a/src/ToolBox/SOS/lldbplugin/CMakeLists.txt b/src/ToolBox/SOS/lldbplugin/CMakeLists.txt index 3477559896..d780cb2e85 100644 --- a/src/ToolBox/SOS/lldbplugin/CMakeLists.txt +++ b/src/ToolBox/SOS/lldbplugin/CMakeLists.txt @@ -63,7 +63,8 @@ if (CLR_CMAKE_PLATFORM_DARWIN) 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 liblldb-3.9-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 or lldb-4.0. Try installing liblldb-3.9-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() @@ -81,13 +82,17 @@ 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) if(REQUIRE_LLDBPLUGIN) - message(FATAL_ERROR "Cannot find LLDB.h. Try installing liblldb-3.9-dev (or the appropriate package for your platform)") + set(MESSAGE_MODE FATAL_ERROR) else() - message(WARNING "Cannot find LLDB.h Try installing liblldb-3.9-dev (or the appropriate package for your platform)") + set(MESSAGE_MODE WARNING) endif() + message(${MESSAGE_MODE} "Cannot find LLDB.h Try installing lldb-3.9-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() |