llvm.org GIT mirror llvm / 814e8a2
[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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358685 91177308-0d34-0410-b5e6-96231b3b80d8 Stefan Granitz 6 months ago
1 changed file(s) with 14 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
16031603 endif()
16041604 endif()
16051605
1606 if(LLVM_EXTERNALIZE_DEBUGINFO_OUTPUT_DIR)
1607 if(APPLE)
1608 set(output_name "$.dSYM")
1606 if(APPLE)
1607 if(LLVM_EXTERNALIZE_DEBUGINFO_EXTENSION)
1608 set(file_ext ${LLVM_EXTERNALIZE_DEBUGINFO_EXTENSION})
1609 else()
1610 set(file_ext dSYM)
1611 endif()
1612
1613 set(output_name "$.${file_ext}")
1614
1615 if(LLVM_EXTERNALIZE_DEBUGINFO_OUTPUT_DIR)
16091616 set(output_path "-o=${LLVM_EXTERNALIZE_DEBUGINFO_OUTPUT_DIR}/${output_name}")
1610 endif()
1611 endif()
1612
1613 if(APPLE)
1617 else()
1618 set(output_path "-o=${output_name}")
1619 endif()
1620
16141621 if(CMAKE_CXX_FLAGS MATCHES "-flto"
16151622 OR CMAKE_CXX_FLAGS_${uppercase_CMAKE_BUILD_TYPE} MATCHES "-flto")
16161623