From c8c68749a23abecf1c2084f60d7707c054793bc6 Mon Sep 17 00:00:00 2001 From: Andrei Date: Thu, 2 Jul 2026 00:51:32 +0200 Subject: [PATCH] Emit a Release PDB for HSMCppWrapper.dll (symbols for the aggregator handoff) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The VS Release config omits debug info by default, so the handoff bundle shipped Release without a .pdb (pack.ps1 warned) — no symbols for crash analysis downstream. Add /Zi (compile) + /DEBUG /OPT:REF /OPT:ICF (link) for the Release config only, so Release stays optimized but produces a PDB. Exports/ABI are unchanged, so the relink stays byte-for-byte identical (545 exports). Co-Authored-By: Claude Opus 4.8 --- src/wrapper/CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/wrapper/CMakeLists.txt b/src/wrapper/CMakeLists.txt index 1b900c6a9..df0bd45e1 100644 --- a/src/wrapper/CMakeLists.txt +++ b/src/wrapper/CMakeLists.txt @@ -46,6 +46,13 @@ target_link_libraries(HSMCppWrapper PRIVATE hsm_collector_cpp) if(MSVC) target_compile_options(HSMCppWrapper PRIVATE /EHsc /W3) + # Emit a PDB for the Release DLL too (the VS Release config omits debug info by default, so the + # handoff bundle otherwise ships Release without symbols for crash analysis at tt-aggregator2). + # /Zi generates the debug info; the linker /DEBUG writes the .pdb; /OPT:REF /OPT:ICF restore the + # size/speed folding that /DEBUG turns off, so Release stays optimized but symbolizable. Exports/ + # ABI are unaffected, so the relink stays byte-for-byte identical. + target_compile_options(HSMCppWrapper PRIVATE $<$:/Zi>) + target_link_options(HSMCppWrapper PRIVATE $<$:/DEBUG /OPT:REF /OPT:ICF>) endif() # Re-export the native C ABI from the DLL so a consumer can call hsm::collector directly via