diff options
author | Julian Büning <julian.buening@rwth-aachen.de> | 2020-05-31 15:45:20 +0200 |
---|---|---|
committer | MartinNowack <2443641+MartinNowack@users.noreply.github.com> | 2020-10-12 11:19:24 +0100 |
commit | 20d08cbef08993340d15855941fa7fe2c86d9f59 (patch) | |
tree | 2f76f2c19864b206a794f4df9090ef5689e6acad | |
parent | c6aa4ab021669fe7102288d294662751a4d4b1e6 (diff) | |
download | klee-20d08cbef08993340d15855941fa7fe2c86d9f59.tar.gz |
fix building klee-cxxabi
Co-authored-by: Felix Rath <felix.rath@comsys.rwth-aachen.de>
-rw-r--r-- | CMakeLists.txt | 12 | ||||
-rw-r--r-- | runtime/Makefile.cmake.bitcode.config.in | 4 | ||||
-rw-r--r-- | runtime/klee-eh-cxx/Makefile.cmake.bitcode | 2 | ||||
-rw-r--r-- | scripts/build/p-klee.inc | 1 |
4 files changed, 11 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 8aaae43b..916c2d74 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -647,17 +647,19 @@ if (ENABLE_KLEE_LIBCXX) "${KLEE_LIBCXX_PATH} does not exist. Try passing -DKLEE_LIBCXX_DIR=<path>") endif() - if (NOT IS_DIRECTORY "${KLEE_LIBCXX_INCLUDE_DIR}") + set(KLEE_LIBCXX_INCLUDE_DIR "" CACHE PATH "Path to libcxx include directory") + if (NOT EXISTS "${KLEE_LIBCXX_INCLUDE_DIR}") message(FATAL_ERROR "${KLEE_LIBCXX_INCLUDE_DIR} does not exist. Try passing -DKLEE_LIBCXX_INCLUDE_DIR=<path>") endif() message(STATUS "Use libc++ include path: \"${KLEE_LIBCXX_INCLUDE_DIR}\"") - if (NOT IS_DIRECTORY "${KLEE_LIBCXXABI_DIR}") + set(KLEE_LIBCXXABI_SRC_DIR "" CACHE PATH "Path to libcxxabi source directory") + if (NOT EXISTS "${KLEE_LIBCXXABI_SRC_DIR}") message(FATAL_ERROR - "${KLEE_LIBCXXABI_DIR} does not exist. Try passing -DKLEE_LIBCXXABI_DIR=<path>") + "${KLEE_LIBCXXABI_SRC_DIR} does not exist. Try passing -DKLEE_LIBCXXABI_SRC_DIR=<path>") endif() - message(STATUS "Use libc++abi path: \"${KLEE_LIBCXXABI_DIR}\"") + message(STATUS "Use libc++abi source path: \"${KLEE_LIBCXXABI_SRC_DIR}\"") # Find the library bitcode archive @@ -679,7 +681,7 @@ if (ENABLE_KLEE_LIBCXX) endif() message(STATUS "Found libc++ library: \"${KLEE_LIBCXX_BC_PATH}\"") - # Make a symlink to KLEE_LIBCXX_EXTERNAL_OBJECT so KLEE can find it where it + # Make a symlink to KLEE_LIBCXX_BC_PATH so KLEE can find it where it # is expected. file(MAKE_DIRECTORY "${KLEE_RUNTIME_DIRECTORY}") execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink diff --git a/runtime/Makefile.cmake.bitcode.config.in b/runtime/Makefile.cmake.bitcode.config.in index 4e2354b8..99faa647 100644 --- a/runtime/Makefile.cmake.bitcode.config.in +++ b/runtime/Makefile.cmake.bitcode.config.in @@ -32,9 +32,9 @@ RUNTIME_CONFIG_STRING := @KLEE_RUNTIME_BUILD_TYPE@ # Optional features ENABLE_POSIX_RUNTIME := @BUILD_POSIX_RUNTIME@ -BUILD_KLEE_CXXABI := @BUILD_KLEE_CXXABI@ +BUILD_KLEE_EH_CXX := @BUILD_KLEE_EH_CXX@ KLEE_LIBCXX_INCLUDE_DIR := @KLEE_LIBCXX_INCLUDE_DIR@ -KLEE_LIBCXXABI_DIR := @KLEE_LIBCXXABI_DIR@ +KLEE_LIBCXXABI_SRC_DIR := @KLEE_LIBCXXABI_SRC_DIR@ KLEE_INCLUDE_DIR := @CMAKE_SOURCE_DIR@/include # Commands diff --git a/runtime/klee-eh-cxx/Makefile.cmake.bitcode b/runtime/klee-eh-cxx/Makefile.cmake.bitcode index f29b947d..aa314613 100644 --- a/runtime/klee-eh-cxx/Makefile.cmake.bitcode +++ b/runtime/klee-eh-cxx/Makefile.cmake.bitcode @@ -7,7 +7,7 @@ ARCHIVE_FILE=$(ARCHIVE_DEST)/libklee-eh-cxx.bca all: $(ARCHIVE_FILE) klee_eh_cxx.bc: $(SRC_DIR)/klee_eh_cxx.cpp - $(LLVMCXX) -nostdinc++ -emit-llvm -c -I$(KLEE_INCLUDE_DIR) -I $(KLEE_LIBCXXABI_DIR)/include -I $(KLEE_LIBCXXABI_DIR)/src -I $(KLEE_LIBCXX_INCLUDE_DIR) $(SRC_DIR)/klee_eh_cxx.cpp -o $@ + $(LLVMCXX) -nostdinc++ -emit-llvm -c -I$(KLEE_INCLUDE_DIR) -I $(KLEE_LIBCXXABI_SRC_DIR)/src -I $(KLEE_LIBCXXABI_SRC_DIR)/include -I $(KLEE_LIBCXX_INCLUDE_DIR) $(SRC_DIR)/klee_eh_cxx.cpp -o $@ $(ARCHIVE_FILE): klee_eh_cxx.bc $(LLVM_AR) rcs $@ $< diff --git a/scripts/build/p-klee.inc b/scripts/build/p-klee.inc index b6c4604c..9608fe89 100644 --- a/scripts/build/p-klee.inc +++ b/scripts/build/p-klee.inc @@ -53,6 +53,7 @@ if [ "${USE_LIBCXX}" -eq 1 ]; then "-DENABLE_KLEE_LIBCXX=TRUE" "-DKLEE_LIBCXX_DIR=${LIBCXX_INSTALL}" "-DKLEE_LIBCXX_INCLUDE_DIR=${LIBCXX_INSTALL}/include/c++/v1" + "-DKLEE_LIBCXXABI_SRC_DIR=${LIBCXX_SRC}/libcxxabi" ) else CMAKE_ARGUMENTS+=( |