Use MSVC_DEBUG_INFORMATION_FORMAT for CoreCLR object libraries#130983
Open
elinor-fung wants to merge 1 commit into
Open
Use MSVC_DEBUG_INFORMATION_FORMAT for CoreCLR object libraries#130983elinor-fung wants to merge 1 commit into
elinor-fung wants to merge 1 commit into
Conversation
Convert the remaining hand-rolled /Z7 compile options on the CoreCLR data descriptor and NativeAOT GC OBJECT libraries to the MSVC_DEBUG_INFORMATION_FORMAT Embedded target property, matching the approach used for the host object libraries. The property (introduced in CMake 3.25) is usable now that the repo minimum is 3.26, and keeps debug-info handling consistent across the object libraries that ship into static libraries. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: c575f5c4-c35f-4fcb-9311-d65a626b8191
|
Azure Pipelines: Successfully started running 4 pipeline(s). 11 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
|
Tagging subscribers to this area: @agocke, @dotnet/ilc-contrib |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates CoreCLR/NativeAOT Windows CMake build logic to use the CMake 3.25+ MSVC_DEBUG_INFORMATION_FORMAT target property (set to Embedded) instead of hand-applied /Z7 compiler options, ensuring object libraries embed CodeView debug info and avoid referencing an external vc140.pdb.
Changes:
- Switch NativeAOT GC OBJECT libraries from
target_compile_options(... /Z7)toset_target_properties(... MSVC_DEBUG_INFORMATION_FORMAT Embedded). - Switch the cDAC data descriptor OBJECT library from
target_compile_options(... /Z7)(and prior PDB-name workaround) toMSVC_DEBUG_INFORMATION_FORMAT Embedded.
Show a summary per file
| File | Description |
|---|---|
| src/coreclr/nativeaot/Runtime/Full/CMakeLists.txt | Replaces /Z7 compile options with MSVC_DEBUG_INFORMATION_FORMAT Embedded for GC object libraries on Windows. |
| src/coreclr/clrdatadescriptors.cmake | Uses MSVC_DEBUG_INFORMATION_FORMAT Embedded for the generated cDAC contract descriptor OBJECT library on MSVC builds. |
Copilot's findings
- Files reviewed: 2/2 changed files
- Comments generated: 2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #130933: convert the
/Z7compile options on the CoreCLR cDAC data descriptor and NativeAOT GC OBJECT libraries to theMSVC_DEBUG_INFORMATION_FORMAT Embeddedtarget property. The property (added in CMake 3.25) is usable now that the repo minimum is 3.26.Also remove setting
COMPILE_PDB_NAMEfor the cDAC descriptor, since it is embedded rather than a separate PDB.cc @MichalStrehovsky @max-charlamb @rcj1