Skip to content
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

Exclude things which broken on Loongarch #78850

Closed
4 changes: 2 additions & 2 deletions eng/Subsets.props
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@
$(CoreClrProjectRoot)tools\dotnet-pgo\dotnet-pgo.csproj;
$(CoreClrProjectRoot)tools\aot\ILCompiler\repro\repro.csproj;
$(CoreClrProjectRoot)tools\r2rtest\R2RTest.csproj" Category="clr" Condition="'$(DotNetBuildFromSource)' != 'true'"/>
<ProjectToBuild Include="$(CoreClrProjectRoot)tools\aot\crossgen2\crossgen2.csproj" Category="clr" />
<ProjectToBuild Condition="'$(TargetArchitecture)' != 'loongarch64'" Include="$(CoreClrProjectRoot)tools\aot\crossgen2\crossgen2.csproj" Category="clr" />
akoeplinger marked this conversation as resolved.
Show resolved Hide resolved
<ProjectToBuild Include="$(CoreClrProjectRoot)tools\aot\ILCompiler.Build.Tasks\ILCompiler.Build.Tasks.csproj" Category="clr" Condition="'$(NativeAotSupported)' == 'true'" />
<ProjectToBuild Include="$(CoreClrProjectRoot)tools\aot\ILCompiler\ILCompiler.csproj" Category="clr" Condition="'$(NativeAotSupported)' == 'true'" />
<ProjectToBuild Include="$(CoreClrProjectRoot)nativeaot\BuildIntegration\BuildIntegration.proj" Category="clr" Condition="'$(NativeAotSupported)' == 'true'" />
Expand Down Expand Up @@ -355,7 +355,7 @@
Test="true" Category="tools"/>
</ItemGroup>

<ItemGroup Condition="$(_subset.Contains('+clr.nativecorelib+'))">
<ItemGroup Condition="$(_subset.Contains('+clr.nativecorelib+')) and '$(TargetArchitecture)' != 'loongarch64'">
<!-- Build crossgen2 that will be used to compile System.Private.CoreLib library for CoreCLR -->
<ProjectToBuild Condition="'$(TargetArchitecture)' != 'x64' and '$(BuildArchitecture)' == 'x64'" Include="$(CoreClrProjectRoot)tools\aot\crossgen2\crossgen2_crossarch.csproj" Category="clr" />
<ProjectToBuild Condition="!('$(TargetArchitecture)' != 'x64' and '$(BuildArchitecture)' == 'x64')" Include="$(CoreClrProjectRoot)tools\aot\crossgen2\crossgen2.csproj" Category="clr" />
Expand Down
6 changes: 6 additions & 0 deletions src/libraries/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@
<ProjectExclusions Include="$(CommonTestPath)System\Net\Prerequisites\**\*.csproj" />
</ItemGroup>

<ItemGroup Condition="$(TargetArchitecture) == 'loongarch64'">
akoeplinger marked this conversation as resolved.
Show resolved Hide resolved
<!-- https://github.com/dotnet/roslyn/issues/65597. -->
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Runtime.InteropServices.JavaScript\gen\JSImportGenerator\JSImportGenerator.csproj" />
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Runtime.InteropServices.JavaScript\src\System.Runtime.InteropServices.JavaScript.csproj" />
</ItemGroup>

<Import Project="NetCoreAppLibrary.props" />
<Import Project="$(RepositoryEngineeringDir)referenceAssemblies.props" Condition="'$(IsReferenceAssemblyProject)' == 'true'" />

Expand Down
1 change: 1 addition & 0 deletions src/tests/Common/ilasm/ilasm.ilproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@

<PropertyGroup>
<RuntimeIdentifier>$(OutputRid)</RuntimeIdentifier>
<NoWarn>$(NoWarn);NU1603</NoWarn>
Copy link
Member

Choose a reason for hiding this comment

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

Disabling this warning does not sound right

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Test project want to use Microsoft.NETCore.App.Runtime.linux-loongarch64 version 7.0.0 which is not exists. Since I use locally built version it produces 8.0.0-dev and because I'm early in the cycle I "hope" that it's not important yet and while I make things working, I can remove this and use separate feed/folder with proper versions.

Test project which as for package - src/tests/Common/test_dependencies_fs/test_dependencies.fsproj

Copy link
Member

Choose a reason for hiding this comment

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

@kant2002 I think this shouldn't be necessary anymore since NetCoreAppToolCurrent which this project is targetting is set to net8.0 instead of net7.0 now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed warning. Let's see how it worked out from main after this merges.

</PropertyGroup>
</Project>
2 changes: 2 additions & 0 deletions src/tests/build.proj
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<MSBuildEnableAllPropertyFunctions>1</MSBuildEnableAllPropertyFunctions>
<Language>C#</Language>
<RuntimeIdentifier>$(OutputRid)</RuntimeIdentifier>
<RestoreAdditionalProjectSources Condition="$(TargetArchitecture) == 'loongarch64'">$(RestoreAdditionalProjectSources);$(ArtifactsPackagesDir)</RestoreAdditionalProjectSources>
Copy link
Member

Choose a reason for hiding this comment

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

This makes the build use packages that were just build instead of the one from the feed. Can we unify this with the mechanism that source build uses to achieve the same?

cc @MichaelSimons

Copy link
Member

Choose a reason for hiding this comment

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

Why is this needed? Which live built packages do you need to restore and reference here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's allow me to use Microsoft.NETCore.App.Runtime.linux-loongarch64
as described in #78854

I use this as temporary stopgap to be able to use test scripts for build tests and run them (to some degree)

Copy link
Member

Choose a reason for hiding this comment

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

This makes the build use packages that were just build instead of the one from the feed. Can we unify this with the mechanism that source build uses to achieve the same?

Source-build does not have a special mechanism to do this within a repo. The source-build mechanism is used to pickup packages that were built from a different repo within the source build.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Technically this line not needed, and only similar line in the file is here. But I assume concerns applied to line below.

Copy link
Member

Choose a reason for hiding this comment

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

@ViktorHofer isn't there some other way of forcing tests to use the live built packages?

Copy link
Member

Choose a reason for hiding this comment

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

@kant2002 I'm curious does the restore error only happen for the test_dependencies.fsproj you mentioned in #78854?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I do not actually know, since I do not fully understand how test infra setup. So I was worrying that I may break something further down the road. I can play according to your directions if you have some ideas to test

</PropertyGroup>

<ItemGroup>
Expand Down Expand Up @@ -432,6 +433,7 @@
<Target Name="RestorePackage">
<PropertyGroup>
<_ConfigurationProperties>/p:TargetOS=$(TargetOS) /p:TargetArchitecture=$(TargetArchitecture) /p:Configuration=$(Configuration) /p:CrossBuild=$(CrossBuild)</_ConfigurationProperties>
<_ConfigurationProperties>$(_ConfigurationProperties) /p:RestoreAdditionalProjectSources=$(ArtifactsPackagesDir)</_ConfigurationProperties>
<DotnetRestoreCommand Condition="'$(__DistroRid)' == ''">"$(DotNetTool)" restore $(RestoreProj) $(PackageVersionArg) /p:SetTFMForRestore=true $(_ConfigurationProperties)</DotnetRestoreCommand>
<DotnetRestoreCommand Condition="'$(__DistroRid)' != ''">"$(DotNetTool)" restore -r $(__DistroRid) $(RestoreProj) $(PackageVersionArg) /p:SetTFMForRestore=true $(_ConfigurationProperties)</DotnetRestoreCommand>
</PropertyGroup>
Expand Down