diff options
author | Cristian Cadar <cristic@cs.stanford.edu> | 2012-01-25 16:49:50 +0000 |
---|---|---|
committer | Cristian Cadar <cristic@cs.stanford.edu> | 2012-01-25 16:49:50 +0000 |
commit | 1715ee37118cdf8785a1dd70d812b6a88ad623e7 (patch) | |
tree | 86815edb50ba2495b31bbadb7dda895c72cfe466 | |
parent | 2cb962226744cb5d51ad701920f18bb2ef0ce5dd (diff) | |
download | klee-1715ee37118cdf8785a1dd70d812b6a88ad623e7.tar.gz |
Patch from Ben Gras which "makes Klee look for the libraries in the
install location instead of the compile-tree location if a compile-time macro is enabled." git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@148961 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | Makefile.common | 2 | ||||
-rw-r--r-- | tools/klee/main.cpp | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/Makefile.common b/Makefile.common index 6556d3c7..c458f600 100644 --- a/Makefile.common +++ b/Makefile.common @@ -36,7 +36,7 @@ else LD.Flags += -L$(PROJ_SRC_ROOT)/stp/lib CXX.Flags += -I$(PROJ_SRC_ROOT)/stp/include endif -CXX.Flags += -DKLEE_DIR=\"$(PROJ_OBJ_ROOT)\" +CXX.Flags += -DKLEE_DIR=\"$(PROJ_OBJ_ROOT)\" -DKLEE_LIB_DIR=\"$(PROJ_libdir)\" # For STP. CXX.Flags += -DEXT_HASH_MAP diff --git a/tools/klee/main.cpp b/tools/klee/main.cpp index 82ced957..78e0d394 100644 --- a/tools/klee/main.cpp +++ b/tools/klee/main.cpp @@ -1214,7 +1214,14 @@ int main(int argc, char **argv, char **envp) { return r; } +#if defined(KLEE_LIB_DIR) && defined(USE_KLEE_LIB_DIR) + /* KLEE_LIB_DIR is the lib dir of installed files as opposed to + * where libs in the klee source tree are generated. + */ + llvm::sys::Path LibraryDir(KLEE_LIB_DIR); +#else llvm::sys::Path LibraryDir(KLEE_DIR "/" RUNTIME_CONFIGURATION "/lib"); +#endif Interpreter::ModuleOptions Opts(LibraryDir.c_str(), /*Optimize=*/OptimizeModule, /*CheckDivZero=*/CheckDivZero); |