about summary refs log tree commit diff homepage
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/kleaver/Makefile4
-rw-r--r--tools/klee/Makefile4
-rw-r--r--tools/klee/main.cpp7
3 files changed, 13 insertions, 2 deletions
diff --git a/tools/kleaver/Makefile b/tools/kleaver/Makefile
index 1631dda6..a2250fe0 100644
--- a/tools/kleaver/Makefile
+++ b/tools/kleaver/Makefile
@@ -32,3 +32,7 @@ include $(PROJ_SRC_ROOT)/MetaSMT.mk
 ifeq ($(HAVE_TCMALLOC),1)
   LIBS += $(TCMALLOC_LIB)
 endif
+
+ifeq ($(HAVE_ZLIB),1)
+  LIBS += -lz
+endif
diff --git a/tools/klee/Makefile b/tools/klee/Makefile
index 676507e0..8d50403f 100644
--- a/tools/klee/Makefile
+++ b/tools/klee/Makefile
@@ -33,3 +33,7 @@ include $(PROJ_SRC_ROOT)/MetaSMT.mk
 ifeq ($(HAVE_TCMALLOC),1)
   LIBS += $(TCMALLOC_LIB)
 endif
+
+ifeq ($(HAVE_ZLIB),1)
+  LIBS += -lz
+endif
\ No newline at end of file
diff --git a/tools/klee/main.cpp b/tools/klee/main.cpp
index 7fe64c72..3e469a6e 100644
--- a/tools/klee/main.cpp
+++ b/tools/klee/main.cpp
@@ -40,6 +40,7 @@
 #include "llvm/LLVMContext.h"
 #include "llvm/Support/FileSystem.h"
 #endif
+#include "llvm/Support/Errno.h"
 #include "llvm/Support/FileSystem.h"
 #include "llvm/Bitcode/ReaderWriter.h"
 #include "llvm/Support/CommandLine.h"
@@ -1430,7 +1431,8 @@ int main(int argc, char **argv, char **envp) {
     if (RunInDir != "") {
       int res = chdir(RunInDir.c_str());
       if (res < 0) {
-        klee_error("Unable to change directory to: %s", RunInDir.c_str());
+        klee_error("Unable to change directory to: %s - %s", RunInDir.c_str(),
+                   sys::StrError(errno).c_str());
       }
     }
 
@@ -1492,7 +1494,8 @@ int main(int argc, char **argv, char **envp) {
     if (RunInDir != "") {
       int res = chdir(RunInDir.c_str());
       if (res < 0) {
-        klee_error("Unable to change directory to: %s", RunInDir.c_str());
+        klee_error("Unable to change directory to: %s - %s", RunInDir.c_str(),
+                   sys::StrError(errno).c_str());
       }
     }
     interpreter->runFunctionAsMain(mainFn, pArgc, pArgv, pEnvp);