feat(build): emit Comgr PDB for Windows driver builds #8153
<!-- therock-pr-bot-policy-check -->
✅ All Checks Passed — Ready for Review
| Check | Status | Details |
|---|:---:|---|
| 📝 PR Description | ✅ Pass | — |
| ⛔ Forbidden Files | ✅ Pass | — |
| 🧪 Unit Test | ✅ Pass | PR does not contain code files — Unit Test auto-passed |
| 🔎 pre-commit | ✅ Pass | — |
| 🚫 Draft PR | 🔜 To Be Enabled | — |
| 🚩 Feature Flag | 🔜 To Be Enabled | — |
| 📊 Code Coverage | 🔜 To Be Enabled | — |
| 🤖 therock-pr-bot | ✅ Pass | — |
🎉 All checks passed! This PR is ready for review.
📖 Need help? See the Policy FAQ for details on every check and how to fix failures.
<!-- therock-pr-bot-fix-policies -->
🎉 All checks passed! This PR is ready for review.
LGTM, thanks
LGTM
Note that we set CMAKE_MSVC_DEBUG_INFORMATION_FORMAT here: https://github.com/ROCm/TheRock/blob/c0ff65998e493b51e7c5c94989d34c56c12a5d82/cmake/therock_compiler_config.cmake#L6-L11
Docs: https://cmake.org/cmake/help/latest/variable/CMAKE_MSVC_DEBUG_INFORMATION_FORMAT.html
For Debug and RelWithDebInfo this sets Embedded, i.e.
EmbeddedCompile with -Z7 or equivalent flag(s) to produce object files with full symbolic debugging information.I generally prefer working through the CMAKE_MSVC_DEBUG_INFORMATION_FORMAT option instead of directly editing compiler flags and link options.
---
I also wonder if https://github.com/ROCm/TheRock/blob/main/CMakePresets.json should set "amd-llvm_BUILD_TYPE": "Release" for Windows as it does for Linux. Maybe this doesn't even need to be scoped to just when THEROCK_FLAG_WINDOWS_DRIVER_BUILD is set, if we use presets more consistently across Windows and Linux (see also https://github.com/ROCm/TheRock/issues/5453)
This looks okay, but I'm wondering if we can accomplish the same thing through native CMake options and CMake presets.
lamb-j
YashDeshpande25
Motivation
Windows driver packages ship Comgr without symbols, so Microsoft's WHQL crash telemetry cannot attribute failures to a function — every crash collapses into a single
amd_comgr_3.dll!Unknownbucket. With symbols indexed at Microsoft, thosebecome per-function buckets that can be triaged as individual bugs.
The PDB is not shipped to end users. It goes only into the WHQL signing package submitted to the Microsoft Hardware Dev Center.
_Work Item: SWDEV-593634_
Related: #6034
Technical Details
Scoped entirely to
THEROCK_FLAG_WINDOWS_DRIVER_BUILD; no effect on any other configuration.Test Plan
Built on Windows (MSVC 19.51 / VS 18):
cmake -B build --preset windows-release -DTHEROCK_AMDGPU_FAMILIES=gfx110X-dgpu
-DTHEROCK_ENABLE_ALL=OFF -DTHEROCK_ENABLE_COMPILER=ON
-DTHEROCK_FLAG_WINDOWS_DRIVER_BUILD=ON
cmake --build build --target artifact-group-compiler
Test Result
Build succeeded. The PDB is the only
.pdbunderbuild/artifacts, and lands indbgrather thanrun:amd-llvm_lib_generic/compiler/amd-comgr/stage/bin/amd_comgr_drivers.dll
amd-llvm_dbg_generic/compiler/amd-comgr/stage/bin/amd_comgr_drivers.pdb
Submission Checklist