Commit 453faeb
FEAT: PDB File generation to make Private symbols for DDBC Bindings (#71)
### Summary
This pull request introduces changes to improve debugging support for
the `ddbc_bindings` project by enabling PDB (Program Database) file
generation and ensuring proper handling of these files during the build
process. The changes primarily focus on updating the CMake configuration
and build script.
### Debugging Support Improvements:
* **Enabled PDB generation for MSVC builds in Release mode**: Added
compile and link options in `CMakeLists.txt` to ensure PDB files are
generated when building with MSVC in Release mode.
(`mssql_python/pybind/CMakeLists.txt`,
[mssql_python/pybind/CMakeLists.txtR8-R13](diffhunk://#diff-dbb5892fbbb28149d1639664797cf3adb48ced28ec11aba95f2e2b338ca46badR8-R13))
* **Configured PDB properties for `ddbc_bindings` target**: Set
properties in `CMakeLists.txt` to specify the PDB file name and output
directory for the `ddbc_bindings` target.
(`mssql_python/pybind/CMakeLists.txt`,
[mssql_python/pybind/CMakeLists.txtR113-R119](diffhunk://#diff-dbb5892fbbb28149d1639664797cf3adb48ced28ec11aba95f2e2b338ca46badR113-R119))
* **Handled PDB file copying in build script**: Updated `build.bat` to
check for the existence of the PDB file after the build, copy it to the
appropriate directory if found, and log diagnostic messages for success
or warnings if the file is missing. (`mssql_python/pybind/build.bat`,
[mssql_python/pybind/build.batR147-R155](diffhunk://#diff-a08055320153458138a68ccff086b540cb080819b76f921664caa782603a4c2eR147-R155))
### Issue Reference
Fixes
[AB#37472](https://sqlclientdrivers.visualstudio.com/c6d89619-62de-46a0-8b46-70b92a84d85e/_workitems/edit/37472)
### Solution Implemented
<!-- Explain the fix implemented -->
- [x] Updated `CMakeLists` and `build.bat` to generate a PDB file for
release
### Checklist
- [x] **Tests Passed** (if applicable)
- [x] **Code is formatted**
- [x] **Docs Updated** (if necessary)
### Testing Performed
<!-- How was this fix tested? -->
- [x] Unit Tests
- [x] Manual Testing
- [x] Python Version: `3.13.3`
- [x] OS: `Windows`
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>1 parent 77c287e commit 453faeb
File tree
5 files changed
+44
-6
lines changed- eng/pipelines
- mssql_python/pybind
5 files changed
+44
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | 4 | | |
10 | 5 | | |
11 | 6 | | |
| |||
43 | 38 | | |
44 | 39 | | |
45 | 40 | | |
| 41 | + | |
46 | 42 | | |
47 | 43 | | |
48 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
129 | 137 | | |
130 | 138 | | |
131 | 139 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
65 | 72 | | |
66 | 73 | | |
67 | 74 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
8 | 14 | | |
9 | 15 | | |
10 | 16 | | |
| |||
19 | 25 | | |
20 | 26 | | |
21 | 27 | | |
| 28 | + | |
22 | 29 | | |
23 | 30 | | |
24 | 31 | | |
| |||
207 | 214 | | |
208 | 215 | | |
209 | 216 | | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
210 | 224 | | |
211 | 225 | | |
212 | 226 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
145 | | - | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
146 | 159 | | |
147 | 160 | | |
148 | 161 | | |
| |||
0 commit comments