about summary refs log tree commit diff homepage
path: root/.travis/klee.sh
diff options
context:
space:
mode:
authorDan Liew <daniel.liew@imperial.ac.uk>2016-11-20 15:29:26 +0000
committerDan Liew <daniel.liew@imperial.ac.uk>2017-01-19 11:50:10 +0000
commit1ffef7b5a0bf78bd4b4a31c626f20e150229d814 (patch)
tree88720bf42b1564b4875b6adfad34e91ac5d70efb /.travis/klee.sh
parent1ffda389d8d20c212884b8a669ebb4cb24f1fa01 (diff)
downloadklee-1ffef7b5a0bf78bd4b4a31c626f20e150229d814.tar.gz
[TravisCI] Modify TravisCI/Docker build scripts to support doing ASan/UBSan builds
of KLEE.

Two configurations (one for each build system) have been added to
TravisCI to do an ASan build.
Diffstat (limited to '.travis/klee.sh')
-rwxr-xr-x.travis/klee.sh19
1 files changed, 13 insertions, 6 deletions
diff --git a/.travis/klee.sh b/.travis/klee.sh
index 8db724ac..61806df3 100755
--- a/.travis/klee.sh
+++ b/.travis/klee.sh
@@ -112,6 +112,11 @@ else
 fi
 
 ###############################################################################
+# Handle Sanitizer flags
+###############################################################################
+source ${KLEE_SRC}/.travis/sanitizer_flags.sh
+
+###############################################################################
 # KLEE
 ###############################################################################
 mkdir klee
@@ -131,7 +136,8 @@ if [ "X${USE_CMAKE}" == "X1" ]; then
     CMAKE_BUILD_TYPE="Debug"
   fi
   # Compute CMake build type
-  CXXFLAGS="${COVERAGE_FLAGS}" \
+  CXXFLAGS="${COVERAGE_FLAGS} ${SANITIZER_CXX_FLAGS}" \
+  CFLAGS="${COVERAGE_FLAGS} ${SANITIZER_C_FLAGS}" \
   cmake \
     -DLLVM_CONFIG_BINARY="/usr/lib/llvm-${LLVM_VERSION}/bin/llvm-config" \
     -DLLVMCC="${KLEE_CC}" \
@@ -163,11 +169,12 @@ else
               ${KLEE_METASMT_CONFIGURE_OPTION} \
               ${KLEE_UCLIBC_CONFIGURE_OPTION} \
               ${TCMALLOC_OPTION} \
-              CXXFLAGS="${COVERAGE_FLAGS}"
-  make \
-    DISABLE_ASSERTIONS=${DISABLE_ASSERTIONS} \
-    ENABLE_OPTIMIZED=${ENABLE_OPTIMIZED} \
-    ENABLE_SHARED=0
+              CXXFLAGS="${COVERAGE_FLAGS} ${SANITIZER_CXX_FLAGS}" \
+              CFLAGS="${COVERAGE_FLAGS} ${SANITIZER_C_FLAGS}" \
+              LDFLAGS="${SANITIZER_LD_FLAGS}"
+  make  DISABLE_ASSERTIONS=${DISABLE_ASSERTIONS} \
+        ENABLE_OPTIMIZED=${ENABLE_OPTIMIZED} \
+        ENABLE_SHARED=0
 fi
 
 ###############################################################################