[llvm] r358685 - [CMake] Allow custom extensions for externalized debug info
Stefan Granitz via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 18 09:37:07 PDT 2019
Author: stefan.graenitz
Date: Thu Apr 18 09:37:07 2019
New Revision: 358685
URL: http://llvm.org/viewvc/llvm-project?rev=358685&view=rev
Log:
[CMake] Allow custom extensions for externalized debug info
Summary:
Extra flexibility for emitting debug info to external files (remains Darwin only for now).
LLDB needs this functionality to emit a LLDB.framework.dSYM instead of LLDB.dSYM when building the framework, because the latter could conflict with the driver's lldb.dSYM when emitted in the same directory on case-insensitive file systems.
Reviewers: friss, bogner, beanz
Subscribers: mgorny, aprantl, llvm-commits, #lldb
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D60862
Modified:
llvm/trunk/cmake/modules/AddLLVM.cmake
Modified: llvm/trunk/cmake/modules/AddLLVM.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/AddLLVM.cmake?rev=358685&r1=358684&r2=358685&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/AddLLVM.cmake (original)
+++ llvm/trunk/cmake/modules/AddLLVM.cmake Thu Apr 18 09:37:07 2019
@@ -1604,14 +1604,21 @@ function(llvm_externalize_debuginfo name
endif()
endif()
- if(LLVM_EXTERNALIZE_DEBUGINFO_OUTPUT_DIR)
- if(APPLE)
- set(output_name "$<TARGET_FILE_NAME:${name}>.dSYM")
+ if(APPLE)
+ if(LLVM_EXTERNALIZE_DEBUGINFO_EXTENSION)
+ set(file_ext ${LLVM_EXTERNALIZE_DEBUGINFO_EXTENSION})
+ else()
+ set(file_ext dSYM)
+ endif()
+
+ set(output_name "$<TARGET_FILE_NAME:${name}>.${file_ext}")
+
+ if(LLVM_EXTERNALIZE_DEBUGINFO_OUTPUT_DIR)
set(output_path "-o=${LLVM_EXTERNALIZE_DEBUGINFO_OUTPUT_DIR}/${output_name}")
+ else()
+ set(output_path "-o=${output_name}")
endif()
- endif()
- if(APPLE)
if(CMAKE_CXX_FLAGS MATCHES "-flto"
OR CMAKE_CXX_FLAGS_${uppercase_CMAKE_BUILD_TYPE} MATCHES "-flto")
More information about the llvm-commits
mailing list