-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Make the intermediate output path OS-specific for CoreCLR/Mono #95797
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
Conversation
CoreLib is an OS-specific library. Using the same intermediate output path for different OSes will lead to using stale artifacts such as ILLink descriptors.
Tagging subscribers to this area: @hoyosjs Issue DetailsCoreLib is an OS-specific library. Using the same intermediate output path for different OSes will lead to using stale artifacts such as ILLink descriptors.
|
<BaseIntermediateOutputPath Condition="'$(IsNativeAotProject)' == 'true'">$([MSBuild]::NormalizeDirectory('$(ArtifactsObjDir)', 'coreclr', 'nativeaot', '$(MSBuildProjectName)'))</BaseIntermediateOutputPath> | ||
<IntermediateOutputPath Condition="'$(PlatformName)' == 'AnyCPU'">$(BaseIntermediateOutputPath)$(Configuration)\</IntermediateOutputPath> | ||
<IntermediateOutputPath Condition="'$(PlatformName)' != 'AnyCPU'">$(BaseIntermediateOutputPath)$(PlatformName)\$(Configuration)\</IntermediateOutputPath> | ||
<IntermediateOutputPath Condition="'$(PlatformName)' != 'AnyCPU'">$(BaseIntermediateOutputPath)$(TargetOS).$(TargetArchitecture).$(Configuration)\</IntermediateOutputPath> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the Condition
be different now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see reason to change it. It's basically testing for "is this library target-specific".
@ViktorHofer, @akoeplinger, this seems like something we can consolidate repo-wide. Makes sense to not mix win-x64 stuff with linux-x64 under obj/. Mono and libraries have similar requirements PlatformName wasn't the best choice for this. |
I agree. |
I agree it would make sense to make the same change in not- |
Yup, it was something for the future. Nice find! :) |
I checked and libraries shouldn't be affected since they're including the TFM (which includes the OS for libraries) in their intermediate folder. I applied this change to src/mono as well, this should cover the missing piece. |
Agreeing with @akoeplinger, the libraries subset shouldn't be touched as:
|
Thanks for fixing this! I hit this a while ago and it was very annoying but then I forgot to track it down :) |
CoreLib is an OS-specific library. Using the same intermediate output path for different OSes can lead to using stale artifacts such as ILLink descriptors.