about summary refs log tree commit diff homepage
path: root/scripts/build
diff options
context:
space:
mode:
authorFrank Busse <bb0xfb@gmail.com>2022-06-13 10:42:51 +0100
committerMartinNowack <2443641+MartinNowack@users.noreply.github.com>2022-06-30 10:02:30 +0100
commit6cc8ee707c1b4337120aa2972e2ad13a4861bbc3 (patch)
tree52aa6fc4f793239963679550e673b6f3a18c3e71 /scripts/build
parentb8539333fdaf32b0f4911d6569ad56a0443190bb (diff)
downloadklee-6cc8ee707c1b4337120aa2972e2ad13a4861bbc3.tar.gz
remove LLVM < 9
Diffstat (limited to 'scripts/build')
-rw-r--r--scripts/build/p-clang-linux-ubuntu.inc6
-rw-r--r--scripts/build/p-clang-linux.inc10
-rw-r--r--scripts/build/p-klee.inc3
-rw-r--r--scripts/build/p-llvm-linux-ubuntu.inc20
-rw-r--r--scripts/build/p-sanitizer-linux-ubuntu.inc6
-rw-r--r--scripts/build/p-sanitizer-linux.inc8
-rw-r--r--scripts/build/patches/llvm60.patch13
-rw-r--r--scripts/build/patches/llvm70.patch13
-rw-r--r--scripts/build/patches/llvm80.patch12
9 files changed, 10 insertions, 81 deletions
diff --git a/scripts/build/p-clang-linux-ubuntu.inc b/scripts/build/p-clang-linux-ubuntu.inc
index 9dac1352..286246ca 100644
--- a/scripts/build/p-clang-linux-ubuntu.inc
+++ b/scripts/build/p-clang-linux-ubuntu.inc
@@ -1,10 +1,6 @@
 install_binary_artifact_clang() {
   local LLVM_VERSION_MAJOR="${LLVM_VERSION/.*/}"
-  local LLVM_VERSION_MINOR="${LLVM_VERSION/*./}"
-
-  local version=""
-  [[ "${LLVM_VERSION_MAJOR}" -le 6 ]] && version="-${LLVM_VERSION}"
-  [[ "${LLVM_VERSION_MAJOR}" -ge 7 ]] && version="-${LLVM_VERSION_MAJOR}"
+  local version="-${LLVM_VERSION_MAJOR}"
 
   source "${DIR}/common-functions"
 
diff --git a/scripts/build/p-clang-linux.inc b/scripts/build/p-clang-linux.inc
index 25f468fa..6481fdd8 100644
--- a/scripts/build/p-clang-linux.inc
+++ b/scripts/build/p-clang-linux.inc
@@ -1,9 +1,6 @@
 setup_artifact_variables_clang() {
   local LLVM_VERSION_MAJOR="${LLVM_VERSION/.*/}"
-  local LLVM_VERSION_MINOR="${LLVM_VERSION/*./}"
-  local version=""
-  [[ "${LLVM_VERSION_MAJOR}" -le 6 ]] && version="-${LLVM_VERSION}"
-  [[ "${LLVM_VERSION_MAJOR}" -ge 7 ]] && version="-${LLVM_VERSION_MAJOR}"
+  local version="-${LLVM_VERSION_MAJOR}"
 
   # Only set LLVM_CONFIG if not set yet
   if [[ -z "${LLVM_CONFIG:-}" ]]; then
@@ -21,10 +18,7 @@ setup_artifact_variables_clang() {
 # Check if the binary artifact is installed
 is_installed_clang() {
   local LLVM_VERSION_MAJOR="${LLVM_VERSION/.*/}"
-  local LLVM_VERSION_MINOR="${LLVM_VERSION/*./}"
-  local version=""
-  [[ "${LLVM_VERSION_MAJOR}" -le 6 ]] && version="${LLVM_VERSION}"
-  [[ "${LLVM_VERSION_MAJOR}" -ge 7 ]] && version="${LLVM_VERSION_MAJOR}"
+  local version="${LLVM_VERSION_MAJOR}"
 
   # Check if clang with the right version exists
   which "clang-${version}"
diff --git a/scripts/build/p-klee.inc b/scripts/build/p-klee.inc
index 1c7d39a5..a69f654a 100644
--- a/scripts/build/p-klee.inc
+++ b/scripts/build/p-klee.inc
@@ -52,9 +52,6 @@ if [ "${USE_LIBCXX}" -eq 1 ]; then
     "-DENABLE_KLEE_LIBCXX=TRUE"
     "-DKLEE_LIBCXX_DIR=${LIBCXX_INSTALL}"
     "-DKLEE_LIBCXX_INCLUDE_DIR=${LIBCXX_INSTALL}/include/c++/v1"
-  )
-  local LLVM_VERSION_MAJOR="${LLVM_VERSION/.*/}"
-  [[ "${LLVM_VERSION_MAJOR}" -ge 8 ]] && CMAKE_ARGUMENTS+=(
     "-DENABLE_KLEE_EH_CXX=TRUE"
     "-DKLEE_LIBCXXABI_SRC_DIR=${LIBCXX_SRC}/libcxxabi"
   )
diff --git a/scripts/build/p-llvm-linux-ubuntu.inc b/scripts/build/p-llvm-linux-ubuntu.inc
index 421fe8cd..48a0083f 100644
--- a/scripts/build/p-llvm-linux-ubuntu.inc
+++ b/scripts/build/p-llvm-linux-ubuntu.inc
@@ -60,9 +60,7 @@ install_binary_artifact_llvm() {
   )
   with_sudo apt -y --no-install-recommends install "${dependencies[@]}"
 
-  local version=""
-  [[ "${LLVM_VERSION_MAJOR}" -le 6 ]] && version="-${LLVM_VERSION}"
-  [[ "${LLVM_VERSION_MAJOR}" -ge 7 ]] && version="-${LLVM_VERSION_MAJOR}"
+  local version="-${LLVM_VERSION_MAJOR}"
 
   # Add LLVM upstream repository if available
   codename="$(lsb_release --codename --short)"
@@ -105,12 +103,8 @@ check_llvm_config_version() {
       [[ -z "${lc}" ]] && return 1
     fi
 
-    local version=""
     local LLVM_VERSION_MAJOR="${LLVM_VERSION/.*/}"
-    local LLVM_VERSION_MINOR="${LLVM_VERSION/*./}"
-    [[ "${LLVM_VERSION_MAJOR}" -le 6 ]] && version="${LLVM_VERSION}"
-    [[ "${LLVM_VERSION_MAJOR}" -ge 7 ]] && version="${LLVM_VERSION_MAJOR}"
-
+    local version="${LLVM_VERSION_MAJOR}"
 
     # Check for llvm-config without suffix but correct version number
     [[ $($lc --version) == "${LLVM_VERSION}"* ]] || return 1
@@ -136,11 +130,8 @@ check_llvm_config_version() {
 # Check if the binary artifact is installed
 is_installed_llvm() {
   # Check for variables set and not empty
-  local version=""
   local LLVM_VERSION_MAJOR="${LLVM_VERSION/.*/}"
-  local LLVM_VERSION_MINOR="${LLVM_VERSION/*./}"
-  [[ "${LLVM_VERSION_MAJOR}" -le 6 ]] && version="${LLVM_VERSION}"
-  [[ "${LLVM_VERSION_MAJOR}" -ge 7 ]] && version="${LLVM_VERSION_MAJOR}"
+  local version="${LLVM_VERSION_MAJOR}"
 
   # Check for llvm-config without suffix but correct version number
   local lc
@@ -158,11 +149,8 @@ is_installed_llvm() {
 
 setup_artifact_variables_llvm() {
     # Check for variables set and not empty
-    local version=""
     local LLVM_VERSION_MAJOR="${LLVM_VERSION/.*/}"
-    local LLVM_VERSION_MINOR="${LLVM_VERSION/*./}"
-    [[ "${LLVM_VERSION_MAJOR}" -le 6 ]] && version="${LLVM_VERSION}"
-    [[ "${LLVM_VERSION_MAJOR}" -ge 7 ]] && version="${LLVM_VERSION_MAJOR}"
+    local version="${LLVM_VERSION_MAJOR}"
 
     local lc=""
     # Check for llvm-config without suffix but correct version number
diff --git a/scripts/build/p-sanitizer-linux-ubuntu.inc b/scripts/build/p-sanitizer-linux-ubuntu.inc
index bb6187ea..30e153bb 100644
--- a/scripts/build/p-sanitizer-linux-ubuntu.inc
+++ b/scripts/build/p-sanitizer-linux-ubuntu.inc
@@ -5,11 +5,7 @@ install_binary_artifact_sanitizer() {
 
   source "${DIR}/common-functions"
   local SANITIZER_LLVM_VERSION_MAJOR="${SANITIZER_LLVM_VERSION/.*/}"
-  local SANITIZER_LLVM_VERSION_MINOR="${SANITIZER_LLVM_VERSION/*./}"
-
-  local version=""
-  [[ "${SANITIZER_LLVM_VERSION_MAJOR}" -le 6 ]] && version="-${SANITIZER_LLVM_VERSION}"
-  [[ "${SANITIZER_LLVM_VERSION_MAJOR}" -ge 7 ]] && version="-${SANITIZER_LLVM_VERSION_MAJOR}"
+  local version="-${SANITIZER_LLVM_VERSION_MAJOR}"
 
   # Add certificate
   with_sudo apt update -y
diff --git a/scripts/build/p-sanitizer-linux.inc b/scripts/build/p-sanitizer-linux.inc
index b7a7718e..fa9f35f3 100644
--- a/scripts/build/p-sanitizer-linux.inc
+++ b/scripts/build/p-sanitizer-linux.inc
@@ -1,9 +1,7 @@
 setup_artifact_variables_sanitizer() {
   local SANITIZER_LLVM_VERSION_MAJOR="${SANITIZER_LLVM_VERSION/.*/}"
   local SANITIZER_LLVM_VERSION_MINOR="${SANITIZER_LLVM_VERSION/*./}"
-  local version=""
-  [[ "${SANITIZER_LLVM_VERSION_MAJOR}" -le 6 ]] && version="-${SANITIZER_LLVM_VERSION}"
-  [[ "${SANITIZER_LLVM_VERSION_MAJOR}" -ge 7 ]] && version="-${SANITIZER_LLVM_VERSION_MAJOR}"
+  local version="-${SANITIZER_LLVM_VERSION_MAJOR}"
 
   # Only set LLVM_CONFIG if not set yet
   if [[ -z "${SANITIZER_LLVM_CONFIG-}" ]]; then
@@ -33,9 +31,7 @@ is_installed_sanitizer() {
   fi
   local SANITIZER_LLVM_VERSION_MAJOR="${SANITIZER_LLVM_VERSION/.*/}"
   local SANITIZER_LLVM_VERSION_MINOR="${SANITIZER_LLVM_VERSION/*./}"
-  local version=""
-  [[ "${SANITIZER_LLVM_VERSION_MAJOR}" -le 6 ]] && version="${SANITIZER_LLVM_VERSION}"
-  [[ "${SANITIZER_LLVM_VERSION_MAJOR}" -ge 7 ]] && version="${SANITIZER_LLVM_VERSION_MAJOR}"
+  local version=="${SANITIZER_LLVM_VERSION_MAJOR}"
 
   # Check if clang with the right version exists
   which "clang-${version}"
diff --git a/scripts/build/patches/llvm60.patch b/scripts/build/patches/llvm60.patch
deleted file mode 100644
index 6a9f7eb7..00000000
--- a/scripts/build/patches/llvm60.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/llvm/tools/llvm-shlib/CMakeLists.txt
-+++ b/llvm/tools/llvm-shlib/CMakeLists.txt
-@@ -36,7 +36,10 @@ endif()
-
- add_llvm_library(LLVM SHARED DISABLE_LLVM_LINK_LLVM_DYLIB SONAME ${SOURCES})
-
-+if(LIB_NAMES)
- list(REMOVE_DUPLICATES LIB_NAMES)
-+endif()
-+
- if(("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") OR (MINGW) OR (HAIKU)
-    OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD")
-    OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "DragonFly")
\ No newline at end of file
diff --git a/scripts/build/patches/llvm70.patch b/scripts/build/patches/llvm70.patch
deleted file mode 100644
index bb6462b7..00000000
--- a/scripts/build/patches/llvm70.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/llvm/tools/llvm-shlib/CMakeLists.txt
-+++ b/llvm/tools/llvm-shlib/CMakeLists.txt
-@@ -36,7 +36,10 @@ endif()
-
- add_llvm_library(LLVM SHARED DISABLE_LLVM_LINK_LLVM_DYLIB SONAME ${SOURCES})
-
-+if(LIB_NAMES)
- list(REMOVE_DUPLICATES LIB_NAMES)
-+endif()
-+
- if(("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") OR (MINGW) OR (HAIKU)
-    OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD")
-    OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "OpenBSD")
\ No newline at end of file
diff --git a/scripts/build/patches/llvm80.patch b/scripts/build/patches/llvm80.patch
deleted file mode 100644
index dcc9f78c..00000000
--- a/scripts/build/patches/llvm80.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- a/llvm/tools/llvm-shlib/CMakeLists.txt
-+++ b/llvm/tools/llvm-shlib/CMakeLists.txt
-@@ -41,7 +41,9 @@ if(LLVM_BUILD_LLVM_DYLIB)
-
-   add_llvm_library(LLVM SHARED DISABLE_LLVM_LINK_LLVM_DYLIB SONAME ${SOURCES})
-
-+  if(LIB_NAMES)
-   list(REMOVE_DUPLICATES LIB_NAMES)
-+  endif()
-   if(("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") OR (MINGW) OR (HAIKU)
-      OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD")
-      OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "GNU")
\ No newline at end of file