[PATCH] D76018: [CMake] Use -ffile-prefix-map instead of -fdebug-prefix-map
Petr Hosek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 11 11:53:10 PDT 2020
phosek updated this revision to Diff 249705.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76018/new/
https://reviews.llvm.org/D76018
Files:
llvm/cmake/modules/HandleLLVMOptions.cmake
Index: llvm/cmake/modules/HandleLLVMOptions.cmake
===================================================================
--- llvm/cmake/modules/HandleLLVMOptions.cmake
+++ llvm/cmake/modules/HandleLLVMOptions.cmake
@@ -1019,14 +1019,14 @@
set(LLVM_SOURCE_PREFIX "" CACHE STRING "Use prefix for sources in debug info")
if(LLVM_USE_RELATIVE_PATHS_IN_DEBUG_INFO)
- check_c_compiler_flag("-fdebug-prefix-map=foo=bar" SUPPORTS_FDEBUG_PREFIX_MAP)
+ check_c_compiler_flag("-ffile-prefix-map=foo=bar" SUPPORTS_FFILE_PREFIX_MAP)
if(LLVM_ENABLE_PROJECTS_USED)
get_filename_component(source_root "${LLVM_MAIN_SRC_DIR}/.." ABSOLUTE)
else()
set(source_root "${LLVM_MAIN_SRC_DIR}")
endif()
file(RELATIVE_PATH relative_root "${source_root}" "${CMAKE_BINARY_DIR}")
- append_if(SUPPORTS_FDEBUG_PREFIX_MAP "-fdebug-prefix-map=${CMAKE_BINARY_DIR}=${relative_root}" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
- append_if(SUPPORTS_FDEBUG_PREFIX_MAP "-fdebug-prefix-map=${source_root}/=${LLVM_SOURCE_PREFIX}" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+ append_if(SUPPORTS_FFILE_PREFIX_MAP "-ffile-prefix-map=${CMAKE_BINARY_DIR}=${relative_root}" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+ append_if(SUPPORTS_FFILE_PREFIX_MAP "-ffile-prefix-map=${source_root}/=${LLVM_SOURCE_PREFIX}" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
add_flag_if_supported("-no-canonical-prefixes" NO_CANONICAL_PREFIXES)
endif()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76018.249705.patch
Type: text/x-patch
Size: 1370 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200311/b271a86b/attachment.bin>
More information about the llvm-commits
mailing list