PDB files generated for some but not all projects #1936
Labels
bug
This issue is a bug.
build-problem
problems with building this sdk
Cmake
Cmake related submissions
p2
This is a standard priority issue
Describe the bug
When building AWS SDK for C++ version 1.9.267, for Windows, as static libraries, some of the Debug|x64 builds fail to generate a .pdb file along with the .lib file.
Expected Behavior
All .vcxproj files generated by CMake should specify:
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
within Debug build configurations (also in RelWithDebugInfo build configurations).
.pdb files should be generated by default for all Debug builds on Windows.
Current Behavior
After running the following two commands from the CMake build directory I created...
cmake ..\aws-sdk-cpp -DCMAKE_BUILD_TYPE="Debug" -DBUILD_ONLY="s3" -DBUILD_SHARED_LIBS="OFF" -DFORCE_SHARED_CRT="OFF" -DENABLE_TESTING="OFF"
"C:\Program Files\Microsoft Visual Studio\2022\Professional\Msbuild\Current\Bin\MSBuild.exe" ALL_BUILD.vcxproj -target:Rebuild -property:Configuration=Debug;Platform=x64 -maxCpuCount:7
...I can then find a .pdb file IN ONLY THE LAST of the following three output folders:
Upon examining the .vcxproj files generated by CMake, only the one for
aws-crt-cpp
specifies:<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
..within the
ItemDefinitionGroup
forDebug|x64
. The other two .vcxproj files instead specify:<DebugInformationFormat>OldStyle</DebugInformationFormat>
and therefore fail to generate a .pdb file.
Reproduction Steps
See "Current Behavior", reported above, for reproduction steps.
Possible Solution
..alter the CMake files for each AWS SDK project, so when a VC++ project is generated by CMake, the
ItemDefinitionGroup
for eachDebug|x64
build in each AWS SDK project will specify:<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
rather than:
<DebugInformationFormat>OldStyle</DebugInformationFormat>
The same should be done for
Debug|Win32
build configurations, as well as allRelWithDebugInfo
build configurations.Since the CMake files which back the
aws-crt-cpp
project are already doing this properly, they can be used as a model in this regard for other CMake projects within the AWS SDK for C++.Additional Information/Context
No response
AWS CPP SDK version used
1.9.267
Compiler and Version used
Visual Studio 2022 build 17.2.2 - MSVC 19.29.30143.0
Operating System and version
Windows 10 version 21H2 build 19044.1706
The text was updated successfully, but these errors were encountered: