about summary refs log tree commit diff homepage
path: root/scripts/build/p-clang-linux.inc
diff options
context:
space:
mode:
authorMartin Nowack <m.nowack@imperial.ac.uk>2023-02-23 22:01:12 +0000
committerCristian Cadar <c.cadar@imperial.ac.uk>2023-03-17 22:38:16 +0000
commitca60811f5d55254bec378919430dd0e7e6e5cdd1 (patch)
treedbd4f7a78929eb959e26755c22e5157808a09862 /scripts/build/p-clang-linux.inc
parentdd492f8763f13312c17eb67af33e3e90217a30e1 (diff)
downloadklee-ca60811f5d55254bec378919430dd0e7e6e5cdd1.tar.gz
Update build scripts
* Support for Ubuntu 22.04
* Remove support for Python2
* Better separation between sanitizer builds and non-sanitizer builds
* Fix build of metaSMT on newer Ubuntu versions
* Use ninja to build LLVM
* Simplifying building arbitrary LLVM configurations, e.g. different
  LLVM sanitizer builds (MemSan, UBSan, ASan)
* Use MemSan with origin tracking
* Build sqlite3 container correctly
* Add support to provide sqlite3 version number
Diffstat (limited to 'scripts/build/p-clang-linux.inc')
-rw-r--r--scripts/build/p-clang-linux.inc7
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/build/p-clang-linux.inc b/scripts/build/p-clang-linux.inc
index 6481fdd8..519333c6 100644
--- a/scripts/build/p-clang-linux.inc
+++ b/scripts/build/p-clang-linux.inc
@@ -7,9 +7,12 @@ setup_artifact_variables_clang() {
     LLVM_CONFIG=$(which "llvm-config${version}")
   fi
 
-
   local bin_path=""
-  bin_path="$(dirname "$(readlink -f "$(which "clang${version}")")")"
+  bin_path=$(which "clang${version}")
+  [[ -z "${bin_path}" ]] && return 1
+
+  bin_path="$(dirname "$(readlink -f "${bin_path}")")"
+  [[ -z "${bin_path}" ]] && return 1
 
   BITCODE_CC="${bin_path}/clang"
   BITCODE_CXX="${bin_path}/clang++"