-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Linker into runtime diff #77569
Linker into runtime diff #77569
Conversation
…ill use the runtime arcade infra Remove build.cmd/build.sh and lint.cmd/lint.sh in src\tools\linker directory since now they will execute via a subset Remove/Merge common files from src\tools\linker root: - .editorconfig - .gitattributes - .gitignore - .github - .gitmodules - after.illink.sln.targets - code_of_conduct.md - global.json - LICENSE.txt - NuGet.config - THIRD-PARTY-NOTICES.TXT Remove/Merge common files from src\tools\linker\eng: - Publishing.props - Signing.props - SourceBuild.props - SourceBuildPrebuiltBaseline.xml - Tools.props - Version.Details.xml - Versions.props
Create a subsets tools.linker and tools.linkertests that build and test the different csproj files Add arcade cecil package to Version.Details.xml and Versions.props Delete cecil from the external folder and its related files Add PackageReference of cecil in Mono.Linker.csproj Tweaks to make things build
Tweaks to make dotnet format to work
Set UsingToolMicrosoftNetILLinkTasks to true to not use the recently build package in CI Remove the PackageId name to workaround the cyclic dependency in the dependency graph Do not use relative paths to find stuff instead use msbuild properties Fix cecil test that checks for an old cecil package version
Change source lines since now we are using spaces instead of tabs (pending issue with pdbs and symbols on assemblies) Workaround the deletion of RefSafetyRulesAttribute and their associated types injected by the compiler For now add extra ExpectedWarnings on warnings being duplicated by the analyzer (pending investigation)
…related tests will fail Upgrade to MicrosoftCodeAnalysisVersion 4.5+ generates a different type of analysis callbacks, the CheckAttributeInstantiation method is no longer needed. And a bug in which a warning was printed twice by the analyzer is fixed.
…e vs the microsoft internal package
Typo on Cecil.Pdb package Update names in csproj's Add warning for file header mismatch/missing
Add condition for test group to any change in src/tools/linker Remove extra tool in global.json Add a dummy line change to test if CI triggers
…er changes Exclude building the clr in linker testing
Tagging subscribers to this area: @dotnet/area-system-reflection-metadata Issue Detailsnull
|
Tagging subscribers to this area: @dotnet/runtime-infrastructure Issue DetailsUpdating the consolidation branch into a new branch called LinkerIntoRuntime inside the runtime repo and adding on top of all the commits in #77149 for an easier updated review.
|
Adding @dotnet/runtime-infrastructure for review |
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.
It might be helpful to adopt the runtime's code style settings in dotnet/linker to make it easier to port commits over after the initial change.
eng/Subsets.props
Outdated
<ItemGroup Condition="$(_subset.Contains('+tools.linkertests+'))"> | ||
<ProjectToBuild Include="$(ToolsProjectRoot)linker\test\Mono.Linker.Tests\Mono.Linker.Tests.csproj" | ||
Test="true" Category="tools" Condition="'$(DotNetBuildFromSource)' != 'true'"/> | ||
<ProjectToBuild Include="$(ToolsProjectRoot)linker\test\Mono.Linker.Tests.Cases\Mono.Linker.Tests.Cases.csproj" | ||
Test="true" Category="tools" Condition="'$(DotNetBuildFromSource)' != 'true'"/> | ||
<ProjectToBuild Include="$(ToolsProjectRoot)linker\test\Mono.Linker.Tests.Cases.Expectations\Mono.Linker.Tests.Cases.Expectations.csproj" | ||
Test="true" Category="tools" Condition="'$(DotNetBuildFromSource)' != 'true'"/> | ||
<ProjectToBuild Include="$(ToolsProjectRoot)linker\test\ILLink.Tasks.Tests\ILLink.Tasks.Tests.csproj" | ||
Test="true" Category="tools" Condition="'$(DotNetBuildFromSource)' != 'true'"/> | ||
<ProjectToBuild Include="$(ToolsProjectRoot)linker\test\ILLink.RoslynAnalyzer.Tests\ILLink.RoslynAnalyzer.Tests.csproj" | ||
Test="true" Category="tools" Condition="'$(DotNetBuildFromSource)' != 'true'"/> | ||
<ProjectToBuild Include="$(ToolsProjectRoot)linker\test\ILLink.RoslynAnalyzer.Tests.Generator\ILLink.RoslynAnalyzer.Tests.Generator.csproj" | ||
Test="true" Category="tools" Condition="'$(DotNetBuildFromSource)' != 'true'"/> | ||
</ItemGroup> |
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 think that you need the DotNetBuildFromSource
condition here as that subset won't be built automatically. Similar to the libs.tests subset which isn't built automatically either.
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.
For now, I think we don't want the burden of everyone building linker even if they won't use it and therefore I'm not including it in the DefaultSubsets. I will remove the conditions for DotNetBuildFromSource
@@ -12,7 +12,7 @@ Method can return constant value if its code will always return the same value ( | |||
public bool Is32Bit { get => false; } | |||
``` | |||
|
|||
On 64bit platforms the property is compiled with constant value, and ILLInk can determine this. It's also possible to use substitutions to overwrite method's return value to a constant via the [substitutions XML file](../data-formats.md#substitution-format). | |||
On 64bit platforms the property is compiled with constant value, and ILLInk can determine this. It's also possible to use substitutions to overwrite method's return value to a constant via the [substitutions XML file](../data-formats.md#substitution-format). |
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.
When we consolidated corefx, coreclr, core-setup and mono into dotnet/runtime, we also moved all the docs into a consolidated location: runtime/docs/
. It might make sense to move these into the consolidated location as well.
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.
You marked this comment as resolved but didn't respond. The proposed docs consolidation doesn't need to happen now (or ever, if others disagree) but I would like to know what you think it about my suggestion.
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.
In this PR I actually moved the docs, that's why I marked it as resolved. But a couple of people in the team tried to review the PR and it was difficult due to non-functional changes. So we decided to keep things that don't affect build/test for follow-up. Sorry for the confusion, I opened #78052 to track moving the docs
With these changes, the tools.linket subset doesn't build automatically. Is that intentional as part of this change? If not, you want to add the subset to the Line 34 in cac1b59
|
@@ -1,123 +1,125 @@ | |||
// Licensed to the .NET Foundation under one or more agreements. |
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.
Could you unify these files with copies under src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/
?
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.
cc @jkotas
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 gave a shot to this very briefly and the NativeAOT files start to add more dependencies very quickly, so I will leave it as a separate item that can be investigated after the first commit (see #77868).
I will close this PR to give priority to #78049 which is a newer sync with linker, does not include non functional changes and renames the linker to illink |
Updating the consolidation branch into a new branch called LinkerIntoRuntime inside the runtime repo and adding on top of all the commits in #77149 for an easier updated review.
For more information about these changes please refer to #75278.