ci: ship PDB debug symbols with release

This commit is contained in:
Brues
2026-08-22 16:06:26 -05:00
parent 0c1d9a6b86
commit 2c7f51cd43
2 changed files with 11 additions and 1 deletions
+2 -1
View File
@@ -117,7 +117,7 @@ jobs:
- name: Build - name: Build
run: | run: |
cmake --build ${{ github.workspace }}/build --config ${{ env.BUILD_TYPE }} cmake --build ${{ github.workspace }}/build --config ${{ env.BUILD_TYPE }}
cmake --install ${{ github.workspace }}/build cmake --install ${{ github.workspace }}/build --config ${{ env.BUILD_TYPE }}
- name: Publish artifact - name: Publish artifact
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
@@ -153,4 +153,5 @@ jobs:
files: | files: |
nampower-${{ github.ref_name }}.zip nampower-${{ github.ref_name }}.zip
nampower-${{ github.ref_name }}/nampower.dll nampower-${{ github.ref_name }}/nampower.dll
nampower-${{ github.ref_name }}/nampower.pdb
fail_on_unmatched_files: true fail_on_unmatched_files: true
+9
View File
@@ -69,4 +69,13 @@ target_link_libraries(${DLL_NAME} shlwapi.lib asmjit.lib udis86.lib)
# Generate MAP file for debugging crashes # Generate MAP file for debugging crashes
target_link_options(${DLL_NAME} PRIVATE /MAP) target_link_options(${DLL_NAME} PRIVATE /MAP)
# Emit full debug symbols (PDB) even in Release so shipped crashes can be
# symbolicated. /Zi produces the debug info; /DEBUG writes the PDB and stamps its
# GUID into the DLL. /DEBUG defaults to /OPT:NOREF,NOICF, so re-enable
# /OPT:REF,ICF to keep the same dead-code elimination and COMDAT folding as a
# plain Release build (i.e. the symbols are added without bloating the binary).
target_compile_options(${DLL_NAME} PRIVATE /Zi)
target_link_options(${DLL_NAME} PRIVATE /DEBUG /OPT:REF /OPT:ICF)
install(TARGETS ${DLL_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}") install(TARGETS ${DLL_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}")
install(FILES $<TARGET_PDB_FILE:${DLL_NAME}> DESTINATION "${CMAKE_INSTALL_PREFIX}")