diff options
-rw-r--r-- | CMakeLists.txt | 8 | ||||
-rw-r--r-- | runtime/CMakeLists.txt | 6 |
2 files changed, 13 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index ba1e221b..3427a6bc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -486,6 +486,14 @@ set_property(CACHE PROPERTY STRINGS ${available_klee_runtime_build_types}) message(STATUS "KLEE_RUNTIME_BUILD_TYPE: ${KLEE_RUNTIME_BUILD_TYPE}") +# Check availability of 32bit support for platform +include(CheckCSourceRuns) +cmake_push_check_state() +set(CMAKE_REQUIRED_FLAGS "-m32") +check_c_source_runs("int main(int argc, char** argv){return 0;}" M32_SUPPORTED) +cmake_pop_check_state() +message(STATUS "32bit platform supported: ${M32_SUPPORTED}") + set(KLEE_INSTALL_RUNTIME_DIR "${CMAKE_INSTALL_FULL_LIBDIR}/klee/runtime") # Location where KLEE will look for the built runtimes by default. diff --git a/runtime/CMakeLists.txt b/runtime/CMakeLists.txt index ea8335de..54521f8b 100644 --- a/runtime/CMakeLists.txt +++ b/runtime/CMakeLists.txt @@ -11,8 +11,12 @@ add_subdirectory(Runtest) # Handle bitcode libraries # Define the different configurations to be compiled and made available using a specific suffix +set(bc_architectures 64) -set(bc_architectures 32 64) +# Compile 32bit support if available +if (M32_SUPPORTED) + list(APPEND bc_architectures "32") +endif () set(LIB_BC_SUFFIX "") |