diff options
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/CMakeLists.txt | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/runtime/CMakeLists.txt b/runtime/CMakeLists.txt index 54521f8b..6ee6f830 100644 --- a/runtime/CMakeLists.txt +++ b/runtime/CMakeLists.txt @@ -34,17 +34,17 @@ foreach (bc_architecture ${bc_architectures}) # Set specific compiler flags depending on the optimization if (bc_optimization STREQUAL "Release") - list(APPEND local_flags -O2 -DNDebug) + list(APPEND local_flags -O2 -DNDEBUG) elseif (bc_optimization STREQUAL "Release+Debug") - list(APPEND local_flags -O2 -g -DNDebug) + list(APPEND local_flags -O2 -g -D_DEBUG -DNDEBUG) elseif (bc_optimization STREQUAL "Release+Asserts") - list(APPEND local_flags -O2 -g) + list(APPEND local_flags -O2) elseif (bc_optimization STREQUAL "Release+Debug+Asserts") - list(APPEND local_flags -O2 -g) + list(APPEND local_flags -O2 -g -D_DEBUG) elseif (bc_optimization STREQUAL "Debug") - list(APPEND local_flags -g -DNDebug) + list(APPEND local_flags -g -D_DEBUG -DNDEBUG) elseif (bc_optimization STREQUAL "Debug+Asserts") - list(APPEND local_flags -g) + list(APPEND local_flags -g -D_DEBUG) else() message(FATAL_ERROR "Optimization (\"${bc_optimization}\") for runtime library unknown.") @@ -59,13 +59,12 @@ message(STATUS "LIB_BC_SUFFIX: ${LIB_BC_SUFFIX}") message(STATUS "KLEE_RUNTIME_DIRECTORY: ${KLEE_RUNTIME_DIRECTORY}") # Add additional setups if needed, e.g. -# `list(APPEND LIB_BC_SUFFIX MY_SPECIAL_CONFIG)` +# `list(APPEND LIB_BC_SUFFIX 64_MY_SPECIAL_CONFIG)` -# Following define the specific flags: LIB_BC_FLAGS_*SUFFIX_FROM_ABOVE* -set(LIB_BC_FLAGS_64) -set(LIB_BC_FLAGS_32 - -m32 - ) +# Following define the specific flags: LIB_BC_FLAGS_*SUFFIX_FROM_ABOVE*, e.g. +# ```set(LIB_BC_FLAGS_64_MY_SPECIAL_CONFIG +# -DSOME_DEFINE +# )`` # Common for all library configurations # Since the runtime now contains fortified libc functions, it is @@ -74,8 +73,6 @@ set(LIB_BC_FLAGS_32 set(COMMON_CC_FLAGS "-I${CMAKE_SOURCE_DIR}/include" "-I${CMAKE_BINARY_DIR}/include" - -g - -D_DEBUG -D_FORTIFY_SOURCE=0 -D_GNU_SOURCE -D__STDC_LIMIT_MACROS |