-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Overhaul external / binplacing / reference from runtime #15705
Conversation
external/coreclr/coreclr.depproj
Outdated
@@ -2,8 +2,6 @@ | |||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build"> | |||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" /> | |||
<PropertyGroup> | |||
<OutputPath>$(RuntimePath)</OutputPath> | |||
<!-- WORKAROUND: Force external packages to be restored for x64 until arm packages are fully broughtup--> |
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.
Intentionally removed the comment?
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 see the file was consolidated, but maybe we still want the comment in the new location (runtime.depproj)
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 can add that back, removing the comment was accidental.
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 doctored up the commits to bring that comment back 👍
This LGTM. The previous functionality was indeed dangerous if you used it to reference anything violating the project build ordering, and there was nothing stopping that from happening. |
This switches the external dir to binplace rather than copy to output. This is more flexible as it will conditionally binplace to many locations based on what's needed for the configuration.
Combine these so we have a common runtime project. Thanks to @joperezr for this change.
ReferenceFromRuntime for src projects isn't safe. It allows any source project to reference the output of another source project without properly sequencing the build. This fixes that by changing ReferenceFromRuntime to instead use a ProjectReference to the runtime project for the building configuration and filter that to just the files requested. I also completely block the use of ReferenceFromRuntime in test projects
dd979c3
to
f0fcb69
Compare
Overhaul external / binplacing / reference from runtime Commit migrated from dotnet/corefx@327f4e5
Best to review commit-by-commit.
First change I made was to switch external to use binplacing logic. Let let us have better control over when to copy and where and allowed copying to multiple locations easily. As part of this I binplace both the primary output (if it exist) as well as all copy-local items.
Second change was to combine coreclr and NETNative into a common runtime project (thanks @joperezr). This was to enable the following change.
Third I fixed ReferenceFromRuntime to use a project reference to the runtime project for src projects, and block its use from tests. This enables us to build multiple configurations at a time that may need different runtime libs without stomping on each other in the runtime path. It also fixes cases where folks might accidentally use ReferenceFromRuntime instead of a project reference.
Finally I noticed that the first change caused a bunch of clashing copies to occur. To fix this (which should be general goodness) I disabled copy local for project references for anything that isn't a test project.
/cc @weshaggard @tarekgh