mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
cmake: keep frame pointers
Frame pointers on: dbghelp's stack walker gets usable frames in crash
reports. /Oy- rather than -fno-omit-frame-pointer -- clang-cl rejects
the GNU spelling:("unknown argument ignored"), and cl.exe takes /Oy-
too. x86-only option; a 64-bit target would ignore it and rely on
unwind data instead.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
committed by
majcosta
co-authored by
Claude Fable 5
parent
dcb4b5bfea
commit
c3578335ab
@@ -42,6 +42,9 @@ if(ADDRESS_SANITIZER)
|
||||
add_compile_options($<IF:$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>,-fsanitize=address,>)
|
||||
endif()
|
||||
|
||||
# keep frame pointers in both MSVC and clang-cl
|
||||
add_compile_options(/Oy-)
|
||||
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
add_compile_options(-fno-delete-null-pointer-checks)
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user