Skip to content

Fix runtime build with -msbuild flag #115606

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 15, 2025
Merged

Conversation

EgorBo
Copy link
Member

@EgorBo EgorBo commented May 15, 2025

CachedInterfaceDispatchCoreclr.cpp and CachedInterfaceDispatchCoreclr.asm forced cmake to produce a vcxproj with changed object names (.o) for CachedInterfaceDispatchCoreclr.asm due to name conflict - it then failed to pick it up. Same for CachedInterfaceDispatchAot.

I renamed the .cpp versions to fix the build - build.cmd -msbuild was effectively broken.

@EgorBo EgorBo marked this pull request as ready for review May 15, 2025 12:14
@Copilot Copilot AI review requested due to automatic review settings May 15, 2025 12:15
@EgorBo EgorBo requested a review from MichalStrehovsky as a code owner May 15, 2025 12:15
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes the runtime build issue when using the -msbuild flag by resolving file name conflicts between CachedInterfaceDispatch variants.

  • Renames CachedInterfaceDispatchCoreclr.cpp to CachedInterfaceDispatch_Coreclr.cpp in the VM sources.
  • Renames CachedInterfaceDispatchAot.cpp to CachedInterfaceDispatch_Aot.cpp in the NativeAOT runtime sources.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
src/coreclr/vm/CMakeLists.txt Renamed CachedInterfaceDispatchCoreclr.cpp to CachedInterfaceDispatch_Coreclr.cpp to fix name conflicts.
src/coreclr/nativeaot/Runtime/CMakeLists.txt Renamed CachedInterfaceDispatchAot.cpp to CachedInterfaceDispatch_Aot.cpp to fix name conflicts.

@github-actions github-actions bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label May 15, 2025
@EgorBo
Copy link
Member Author

EgorBo commented May 15, 2025

PTAL @jkoritzinsky @dotnet/jit-contrib if any of you use -msbuild build

@jakobbotsch
Copy link
Member

Fixes #113708

@EgorBo
Copy link
Member Author

EgorBo commented May 15, 2025

Fixes #113708

Ah, I didn't see that one. Looks like what I've done here was suggested there in #113708 (comment)

@EgorBo EgorBo merged commit 98b09ef into dotnet:main May 15, 2025
98 checks passed
@EgorBo EgorBo deleted the fix-native-msbuild branch May 15, 2025 17:09
@github-actions github-actions bot locked and limited conversation to collaborators Jun 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants