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:
Marco Antonio J. Costa
2026-07-28 14:22:16 -03:00
committed by majcosta
co-authored by Claude Fable 5
parent dcb4b5bfea
commit c3578335ab
+3
View File
@@ -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()