Use execinfo.h by default for clang/apple clang on macos, #161
This commit is contained in:
parent
f9ab949a9e
commit
d09378c8e8
@ -116,7 +116,15 @@ if(
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
# Attempt to auto-config
|
# Attempt to auto-config
|
||||||
if(UNIX)
|
if(APPLE AND ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang"))
|
||||||
|
if(HAS_EXECINFO)
|
||||||
|
set(CPPTRACE_UNWIND_WITH_EXECINFO On)
|
||||||
|
message(STATUS "Cpptrace auto config: Using execinfo.h for unwinding")
|
||||||
|
else()
|
||||||
|
set(CPPTRACE_UNWIND_WITH_NOTHING On)
|
||||||
|
message(FATAL_ERROR "Cpptrace auto config: No unwinding back-end seems to be supported, stack tracing will not work. To compile anyway set CPPTRACE_UNWIND_WITH_NOTHING.")
|
||||||
|
endif()
|
||||||
|
elseif(UNIX)
|
||||||
if(HAS_UNWIND)
|
if(HAS_UNWIND)
|
||||||
set(CPPTRACE_UNWIND_WITH_UNWIND On)
|
set(CPPTRACE_UNWIND_WITH_UNWIND On)
|
||||||
message(STATUS "Cpptrace auto config: Using libgcc unwind for unwinding")
|
message(STATUS "Cpptrace auto config: Using libgcc unwind for unwinding")
|
||||||
|
|||||||
12
README.md
12
README.md
@ -1051,12 +1051,12 @@ Unwinding, symbol resolution, and demangling.
|
|||||||
The library's CMake automatically configures itself for what your system supports. The ideal configuration is as
|
The library's CMake automatically configures itself for what your system supports. The ideal configuration is as
|
||||||
follows:
|
follows:
|
||||||
|
|
||||||
| Platform | Unwinding | Symbols | Demangling |
|
| Platform | Unwinding | Symbols | Demangling |
|
||||||
| -------- | ------------- | ------------------ | -------------------- |
|
| -------- | ------------------------------------------------------- | ------------------ | -------------------- |
|
||||||
| Linux | `_Unwind` | libdwarf | cxxabi.h |
|
| Linux | `_Unwind` | libdwarf | cxxabi.h |
|
||||||
| MacOS | `_Unwind` | libdwarf | cxxabi.h |
|
| MacOS | `_Unwind` for gcc, execinfo.h for clang and apple clang | libdwarf | cxxabi.h |
|
||||||
| Windows | `StackWalk64` | dbghelp | No demangling needed |
|
| Windows | `StackWalk64` | dbghelp | No demangling needed |
|
||||||
| MinGW | `StackWalk64` | libdwarf + dbghelp | cxxabi.h |
|
| MinGW | `StackWalk64` | libdwarf + dbghelp | cxxabi.h |
|
||||||
|
|
||||||
Support for these back-ends is the main development focus and they should work well. If you want to use a different
|
Support for these back-ends is the main development focus and they should work well. If you want to use a different
|
||||||
back-end such as addr2line, for example, you can configure the library to do so.
|
back-end such as addr2line, for example, you can configure the library to do so.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user