[PATCH] D133074: [cmake][wip] Add support for setting crash report directory
Paul Kirth via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 1 08:35:58 PDT 2022
paulkirth updated this revision to Diff 457286.
paulkirth added a comment.
Actually passthrough/update the variable in the runtimes build.
Remove debugging code.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133074/new/
https://reviews.llvm.org/D133074
Files:
llvm/CMakeLists.txt
llvm/cmake/modules/HandleLLVMOptions.cmake
llvm/runtimes/CMakeLists.txt
Index: llvm/runtimes/CMakeLists.txt
===================================================================
--- llvm/runtimes/CMakeLists.txt
+++ llvm/runtimes/CMakeLists.txt
@@ -83,6 +83,7 @@
PASSTHROUGH_PREFIXES COMPILER_RT
DARWIN
SANITIZER
+ LLVM_CRASH_REPORT_DIR
USE_TOOLCHAIN
TARGET_TRIPLE ${LLVM_TARGET_TRIPLE}
${EXTRA_ARGS})
@@ -242,6 +243,7 @@
${RUNTIMES_CMAKE_ARGS}
PASSTHROUGH_PREFIXES LLVM_ENABLE_RUNTIMES
LLVM_USE_LINKER
+ LLVM_CRASH_REPORT_DIR
${ARG_PREFIXES}
EXTRA_TARGETS ${extra_targets}
${test_targets}
@@ -340,6 +342,10 @@
list(APPEND ${name}_extra_args -DLLVM_USE_LINKER=${LLVM_USE_LINKER})
endif()
+ if(NOT RUNTIMES_${name}_LLVM_CRASH_REPORT_DIR AND NOT RUNTIMES_${target}_LLVM_CRASH_REPORT_DIR)
+ list(APPEND ${name}_extra_args -DLLVM_CRASH_REPORT_DIR=${LLVM_CRASH_REPORT_DIR})
+ endif()
+
llvm_ExternalProject_Add(runtimes-${name}
${CMAKE_CURRENT_SOURCE_DIR}/../../runtimes
DEPENDS ${${name}_deps}
Index: llvm/cmake/modules/HandleLLVMOptions.cmake
===================================================================
--- llvm/cmake/modules/HandleLLVMOptions.cmake
+++ llvm/cmake/modules/HandleLLVMOptions.cmake
@@ -85,6 +85,10 @@
endif()
endif()
+if(DEFINED LLVM_CRASH_REPORT_DIR AND CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+ append("-fcrash-diagnostics-dir=${LLVM_CRASH_REPORT_DIR}" CMAKE_CXX_FLAGS CMAKE_C_FLAGS)
+endif()
+
if(LLVM_ENABLE_EXPENSIVE_CHECKS)
add_definitions(-DEXPENSIVE_CHECKS)
Index: llvm/CMakeLists.txt
===================================================================
--- llvm/CMakeLists.txt
+++ llvm/CMakeLists.txt
@@ -862,6 +862,8 @@
" no longer supported.")
endif()
+set(LLVM_CRASH_REPORT_DIR "" CACHE STRING "Define directory name for crash reports" )
+
include(HandleLLVMOptions)
######
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D133074.457286.patch
Type: text/x-patch
Size: 2385 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220901/bebc0eab/attachment.bin>
More information about the llvm-commits
mailing list