Skip to content

Commit e7b8d37

Browse files
[libunwind] LIBUNWIND_REMEMBER_HEAP_ALLOC to cmake.
Missed it originally in https://reviews.llvm.org/D85005. Reviewed By: gargaroff Differential Revision: https://reviews.llvm.org/D91182
1 parent b873aba commit e7b8d37

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

libunwind/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ option(LIBUNWIND_USE_COMPILER_RT "Use compiler-rt instead of libgcc" OFF)
6969
option(LIBUNWIND_INCLUDE_DOCS "Build the libunwind documentation." ${LLVM_INCLUDE_DOCS})
7070
option(LIBUNWIND_IS_BAREMETAL "Build libunwind for baremetal targets." OFF)
7171
option(LIBUNWIND_USE_FRAME_HEADER_CACHE "Cache frame headers for unwinding. Requires locking dl_iterate_phdr." OFF)
72+
option(LIBUNWIND_REMEMBER_HEAP_ALLOC "Use heap instead of the stack for .cfi_remember_state." OFF)
7273

7374
set(LIBUNWIND_LIBDIR_SUFFIX "${LLVM_LIBDIR_SUFFIX}" CACHE STRING
7475
"Define suffix of library directory name (32/64)")
@@ -312,6 +313,10 @@ if(LIBUNWIND_USE_FRAME_HEADER_CACHE)
312313
add_compile_definitions(_LIBUNWIND_USE_FRAME_HEADER_CACHE)
313314
endif()
314315

316+
if(LIBUNWIND_REMEMBER_HEAP_ALLOC)
317+
add_compile_definitions(_LIBUNWIND_REMEMBER_HEAP_ALLOC)
318+
endif()
319+
315320
# This is the _ONLY_ place where add_definitions is called.
316321
if (MSVC)
317322
add_definitions(-D_CRT_SECURE_NO_WARNINGS)

0 commit comments

Comments
 (0)