about summary refs log tree commit diff homepage
diff options
context:
space:
mode:
authorCristian Cadar <c.cadar@imperial.ac.uk>2014-12-18 17:28:34 +0000
committerCristian Cadar <c.cadar@imperial.ac.uk>2014-12-18 17:28:34 +0000
commita07c47538984c57f1dcc63606a3808bd9651e9f3 (patch)
tree4a543a0898d8758600e74dcde138d551d559b0ea
parent5acb6356d1fdf6b87c8669e8eb88c720b8dc3ee9 (diff)
parent060c39c512aa6d06a01a9d52dbefa8ff45054b32 (diff)
downloadklee-a07c47538984c57f1dcc63606a3808bd9651e9f3.tar.gz
Merge pull request #178 from mchalupa/master
klee: let user override path to runtime library
-rw-r--r--tools/klee/main.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/klee/main.cpp b/tools/klee/main.cpp
index a92aa559..23c07f03 100644
--- a/tools/klee/main.cpp
+++ b/tools/klee/main.cpp
@@ -575,6 +575,11 @@ void KleeHandler::getOutFiles(std::string path,
 }
 
 std::string KleeHandler::getRunTimeLibraryPath(const char *argv0) {
+  // allow specifying the path to the runtime library
+  const char *env = getenv("KLEE_RUNTIME_LIBRARY_PATH");
+  if (env)
+    return std::string(env);
+
   // Take any function from the execution binary but not main (as not allowed by
   // C++ standard)
   void *MainExecAddr = (void *)(intptr_t)getRunTimeLibraryPath;