about summary refs log tree commit diff homepage
path: root/scripts/build/p-llvm-linux-ubuntu-16.04.inc
diff options
context:
space:
mode:
authorMartin Nowack <m.nowack@imperial.ac.uk>2020-01-23 15:25:45 +0000
committerCristian Cadar <c.cadar@imperial.ac.uk>2020-02-13 17:39:21 +0000
commitdbda156217c532a7e1a65e8c216e593a64c0b8fc (patch)
tree015e9b05723106f58c7865f1636ad7157edd41bb /scripts/build/p-llvm-linux-ubuntu-16.04.inc
parent64a2b1a93648461f11daa44911d791c28bc00885 (diff)
downloadklee-dbda156217c532a7e1a65e8c216e593a64c0b8fc.tar.gz
Update ubuntu build dependencies for KLEE
Build dependencies for different components were tied to a specific Ubuntu version (16.04).
Although, they are the same for newer versions as well.

By renaming `p-component-linux-ubuntu-16.04.inc` to `p-component-linux-ubuntu.inc`, the script can be used for newer Ubuntu versions as well.

Do some minor cleaning up.
Diffstat (limited to 'scripts/build/p-llvm-linux-ubuntu-16.04.inc')
-rw-r--r--scripts/build/p-llvm-linux-ubuntu-16.04.inc93
1 files changed, 0 insertions, 93 deletions
diff --git a/scripts/build/p-llvm-linux-ubuntu-16.04.inc b/scripts/build/p-llvm-linux-ubuntu-16.04.inc
deleted file mode 100644
index bab32d45..00000000
--- a/scripts/build/p-llvm-linux-ubuntu-16.04.inc
+++ /dev/null
@@ -1,93 +0,0 @@
-# Build dependencies
-install_build_dependencies_llvm() { 
-  apt update -y
-
-  dependencies=(
-    build-essential
-    autoconf
-    automake
-    groff
-    gcc
-    g++
-    python-dev
-    make
-    subversion # To check out code
-    zlib1g-dev
-    cmake
-  )
-  
-  if [[ "${SANITIZERS[*]}" == "memory" ]]; then
-    dependencies+=(ninja-build)
-  fi
-
-  #Install essential dependencies
-  apt -y --no-install-recommends install "${dependencies[@]}"
-}
-
-install_binary_artifact_llvm() {
-  local enable_optimized=$(to_bool "${ENABLE_OPTIMIZED}")
-  local enable_debug=$(to_bool "${ENABLE_DEBUG}")
-  local disable_assertions=$(to_bool "${DISABLE_ASSERTIONS}")
-  local requires_rtti=$(to_bool "${REQUIRES_RTTI}")
-  local LLVM_VERSION_MAJOR="${LLVM_VERSION/.*/}"
-  local LLVM_VERSION_MINOR="${LLVM_VERSION/*./}"
-
-
-  # No support for LLVM packages with debug information, incompatible if requested otherwise
-  [[ "${enable_debug}" -eq 1 ]] && return 1
-
-  # Packages are build with assertions disabled, incompatible if requested otherwise
-  [[ "${disable_assertions}" -eq 0 ]] && return 1
-
-  # Packages are build with RTTI enabled, incompatible if requested otherwise
-  [[ "${requires_rtti}" -eq 0 ]] && return 1
-
-  # Enable/Disable optimized does not matter
-  
-  # Add certificate
-  apt update -y
-  dependencies=(
-    ca-certificates
-    wget
-  )
-  apt -y --no-install-recommends install "${dependencies[@]}"
-  wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key| apt-key add -
-  
-  local version=""
-  [[ "${LLVM_VERSION_MAJOR}" -le 6 ]] && version="-${LLVM_VERSION}"
-  [[ "${LLVM_VERSION_MAJOR}" -ge 7 ]] && version="-${LLVM_VERSION_MAJOR}"
-  
-  # Add repository
-  echo "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial${version} main" >> /etc/apt/sources.list
-  apt update -y
-
-  dependencies=(
-    "llvm${version}"
-    "llvm${version}-dev"
-    "llvm${version}-runtime"
-    "clang${version}"
-  )
-
-  #Install essential dependencies
-  apt -y --no-install-recommends install "${dependencies[@]}"
-}
-
-# Check if the binary artifact is installed
-is_installed_llvm() {
-    local lc=""
-    # Check if llvm-config with the right version exists    
-    lc=$(which "llvm-config-${LLVM_VERSION}")
-    
-    [[ -z "${lc}" ]] && return 1
-
-    local rtti
-    rtti="$(${lc} --has-rtti)"
-    local assertion
-    assertion="$(${lc} --assertion-mode)"
-    local build_mode
-    build_mode="$(${lc} --build-mode)"
-
-    # Check requested mode with mode of the found item  
-    [[ $(to_bool "${REQUIRES_RTTI}") -eq $(to_bool "${rtti}") ]] || return 1
-    [[ $(to_bool "${DISABLE_ASSERTIONS}") -ne $(to_bool "${assertion}") ]] || return 1
-}