From c3578335abfff89f2e54a9c925e2f55d4d1cc43d Mon Sep 17 00:00:00 2001 From: "Marco Antonio J. Costa" Date: Tue, 28 Jul 2026 13:53:03 -0300 Subject: [PATCH] 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 --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 11c28801c..01eb82f9b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,6 +42,9 @@ if(ADDRESS_SANITIZER) add_compile_options($,$>,-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()