diff options
author | Martin Nowack <martin.nowack@gmail.com> | 2018-05-15 15:10:16 +0100 |
---|---|---|
committer | Cristian Cadar <c.cadar@imperial.ac.uk> | 2018-07-04 15:13:02 +0100 |
commit | 6803c37be83f0c97c95870a18cb230e135a131c9 (patch) | |
tree | e42ae967f248014aa392ac1a985fc5a39203c789 /runtime/CMakeLists.txt | |
parent | b25705f4d9cfdb4a7f9ecc4565cb31623f7bd38d (diff) | |
download | klee-6803c37be83f0c97c95870a18cb230e135a131c9.tar.gz |
Reorganise runtime libraries provided by KLEE
Strictly differentiate between the following type of libraries: * FreeStanding: contains minimal amount of methods a compiler would expect * klee-libc: contains a minimal libc implementation * POSIX: contains a POSIX layer that can be used on top of a libc implementation * Intrinsic: contains additional runtime functions which provide KLEE-specific functionalities, (e.g. checks) Builds always archives instead of single modules. This allows to reduce linked-in dependencies of tested applications.
Diffstat (limited to 'runtime/CMakeLists.txt')
-rw-r--r-- | runtime/CMakeLists.txt | 31 |
1 files changed, 6 insertions, 25 deletions
diff --git a/runtime/CMakeLists.txt b/runtime/CMakeLists.txt index 2a056d9f..53a2f838 100644 --- a/runtime/CMakeLists.txt +++ b/runtime/CMakeLists.txt @@ -26,17 +26,6 @@ else() set(RUNTIME_HAS_DEBUG_SYMBOLS 0) endif() - -# FIXME: This is a horrible hack that needs to die. -# Things are very inconsistent. The runtime instrinsic -# is sometimes a LLVM module or a bitcode archive. -if ("${LLVM_PACKAGE_VERSION}" VERSION_EQUAL "3.3" OR - "${LLVM_PACKAGE_VERSION}" VERSION_GREATER "3.3") - set(USE_RUNTIME_BINARY_TYPE_HACK 1) -else() - set(USE_RUNTIME_BINARY_TYPE_HACK 0) -endif() - if (ENABLE_POSIX_RUNTIME) set(BUILD_POSIX_RUNTIME 1) else() @@ -55,7 +44,7 @@ configure_file("Makefile.cmake.bitcode.rules" "Makefile.cmake.bitcode.rules" COP # Makefile for root runtime directory # Copy over makefiles for libraries -set(BITCODE_LIBRARIES "Intrinsic" "klee-libc") +set(BITCODE_LIBRARIES "Intrinsic" "klee-libc" "FreeStanding") if (ENABLE_POSIX_RUNTIME) list(APPEND BITCODE_LIBRARIES "POSIX") endif() @@ -130,19 +119,11 @@ add_dependencies(clean_all clean_runtime) ############################################################################### set(RUNTIME_FILES_TO_INSTALL) -# This is quite fragile and depends on knowledge in the bitcode -# build system. Hopefully it won't change very often though. - -# FIXME: This hack needs to die! -if (USE_RUNTIME_BINARY_TYPE_HACK) - list(APPEND RUNTIME_FILES_TO_INSTALL - "${KLEE_RUNTIME_DIRECTORY}/kleeRuntimeIntrinsic.bc" - "${KLEE_RUNTIME_DIRECTORY}/klee-libc.bc") -else() - list(APPEND RUNTIME_FILES_TO_INSTALL - "${KLEE_RUNTIME_DIRECTORY}/libkleeRuntimeIntrinsic.bca" - "${KLEE_RUNTIME_DIRECTORY}/libklee-libc.bca") -endif() +list(APPEND RUNTIME_FILES_TO_INSTALL + "${KLEE_RUNTIME_DIRECTORY}/kleeRuntimeIntrinsic.bc" + "${KLEE_RUNTIME_DIRECTORY}/klee-libc.bc" + "${KLEE_RUNTIME_DIRECTORY}/kleeRuntimeFreeStanding.bc" + ) if (ENABLE_POSIX_RUNTIME) list(APPEND RUNTIME_FILES_TO_INSTALL |