diff --git a/CMakeLists.txt b/CMakeLists.txt index bd6a915c9fcde4a79104885551504beafa61fb5c..7b4bb346f91269a28e3b05facb6e058971776c85 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -53,8 +53,6 @@ if(NOT EXISTS ${PROJECT_SOURCE_DIR}/src/lib/small/CMakeLists.txt) endif() endif() -option(DEV_BUILD "Enable build options that make debugging more convenient" OFF) - # Define GNU standard installation directories include(GNUInstallDirs) diff --git a/changelogs/unreleased/gh-7808-fix-abs-file-paths-in-diag-and-debug-info.md b/changelogs/unreleased/gh-7808-fix-abs-file-paths-in-diag-and-debug-info.md index 9ab923cf5cc0bbc22d178b614c419c0bdcc5b176..6f46ed91093eac1c4cdc776cbb05d1a3370064c9 100644 --- a/changelogs/unreleased/gh-7808-fix-abs-file-paths-in-diag-and-debug-info.md +++ b/changelogs/unreleased/gh-7808-fix-abs-file-paths-in-diag-and-debug-info.md @@ -1,6 +1,4 @@ ## feature/build -* Made diagnostics and debugging information provide absolute file paths - instead of relative ones when building by default (absolute file paths in - debugging information can be retained by turning on `DEV_BUILD` CMake - option) (gh-7808). +* Made diagnostics provide absolute file paths instead of relative ones + (gh-7808). diff --git a/cmake/prefix.cmake b/cmake/prefix.cmake index 231844a595e3babb93923108092c8a9626c06f45..0c7ae26eff512cc1fcfab4a6f7dcd42a7115a9db 100644 --- a/cmake/prefix.cmake +++ b/cmake/prefix.cmake @@ -1,5 +1,3 @@ -# Uses the `DEV_BUILD` option. - # Assuming the C and C++ compiler IDs are equal. # For clang `MATCHES` is used to match both Clang and AppleClang. # `VERSION_GREATER` instead of `VERSION_GREATER_EQUAL` for compatibility @@ -8,23 +6,3 @@ if ((CMAKE_C_COMPILER_ID MATCHES "Clang" AND (CMAKE_C_COMPILER_VERSION VERSION_G (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND (CMAKE_C_COMPILER_VERSION VERSION_GREATER "8" OR CMAKE_C_COMPILER_VERSION VERSION_EQUAL "8"))) set(PREFIX_MAP_FLAGS "-fmacro-prefix-map=${CMAKE_SOURCE_DIR}=.") endif() - -# Assuming the C and C++ compiler IDs are equal. -# For clang `MATCHES` is used to match both Clang and AppleClang. -# Since this flag requires an extra command to tell the debugger where to find -# the source files, which is not convenient for developers, it is disabled when -# `DEV_BUILD` option is turned on. -if (NOT DEV_BUILD AND - # `VERSION_GREATER` instead of `VERSION_GREATER_EQUAL` for compatibility - # with cmake 3.5 on ubuntu 16.04. - ((CMAKE_C_COMPILER_ID MATCHES "Clang" AND (CMAKE_C_COMPILER_VERSION VERSION_GREATER "3.8" OR CMAKE_C_COMPILER_VERSION VERSION_EQUAL "3.8")) OR - (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND (CMAKE_C_COMPILER_VERSION VERSION_GREATER "4.4.7" OR CMAKE_C_COMPILER_VERSION VERSION_EQUAL "4.4.7")))) - # Clang integrated assembler does not support this option. - set(CMAKE_REQUIRED_FLAGS "-Wa,--debug-prefix-map") - check_c_source_compiles("int main(void) {}" HAVE_AS_DEBUG_PREFIX_MAP) - unset(CMAKE_REQUIRED_FLAGS) - if (HAVE_WA_DEBUG_PREFIX_MAP) - set(AS_DEBUG_PREFIX_MAP_FLAG "-Wa,--debug-prefix-map=${CMAKE_SOURCE_DIR}=.") - endif() - set(PREFIX_MAP_FLAGS "${PREFIX_MAP_FLAGS} -fdebug-prefix-map=${CMAKE_SOURCE_DIR}=. ${AS_DEBUG_PREFIX_MAP_FLAG}") -endif() diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index fc88caadd94b544065c7c892131f244b389646eb..21a1b87beec4277214cec0827a571cdc2c014af5 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -272,10 +272,8 @@ add_subdirectory(box) include_directories(${EXTRA_BOX_INCLUDE_DIRS}) # Save CMAKE_XXX_FLAGS from this directory for config.h (used in --version) -string(REPLACE ${PREFIX_MAP_FLAGS} "" STRIPPED_CMAKE_C_FLAGS ${CMAKE_C_FLAGS}) -set(TARANTOOL_C_FLAGS ${STRIPPED_CMAKE_C_FLAGS} PARENT_SCOPE) -string(REGEX REPLACE ${PREFIX_MAP_FLAGS} "" STRIPPED_CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) -set(TARANTOOL_CXX_FLAGS ${STRIPPED_CMAKE_CXX_FLAGS} PARENT_SCOPE) +set(TARANTOOL_C_FLAGS ${CMAKE_C_FLAGS} PARENT_SCOPE) +set(TARANTOOL_CXX_FLAGS ${CMAKE_CXX_FLAGS} PARENT_SCOPE) set(EXPORT_LIST) if(BUILD_STATIC) diff --git a/static-build/CMakeLists.txt b/static-build/CMakeLists.txt index aea33388cec48660020f46875db22796bf5f8cb7..252fdc0198b422d6b9c692a4c36408b7eada6afd 100644 --- a/static-build/CMakeLists.txt +++ b/static-build/CMakeLists.txt @@ -25,8 +25,6 @@ set(READLINE_VERSION 8.0) set(READLINE_HASH 7e6c1f16aee3244a69aba6e438295ca3) set(BACKUP_STORAGE https://distrib.hb.bizmrg.com) -option(DEV_BUILD "Enable build options that make debugging more convenient" OFF) - include(../cmake/os.cmake) include(../cmake/profile.cmake) include(../cmake/hardening.cmake)