From 060c39c512aa6d06a01a9d52dbefa8ff45054b32 Mon Sep 17 00:00:00 2001 From: Marek Chalupa Date: Mon, 1 Dec 2014 09:26:19 +0100 Subject: klee: let user override path to runtime library When looking for runtime library, look first into KLEE_RUNTIME_LIBRARY_PATH environment variable. This allows to use klee not only in 'hardcoded' environment. Signed-off-by: Marek Chalupa --- tools/klee/main.cpp | 5 +++++ 1 file changed, 5 insertions(+) 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; -- cgit 1.4.1