Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion eng/Subsets.props
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@
<PropertyGroup>
<!-- CLR NativeAot only builds in a subset of the matrix -->
<NativeAotSupported Condition="('$(TargetOS)' == 'windows' or '$(TargetOS)' == 'linux' or '$(TargetOS)' == 'osx' or '$(TargetOS)' == 'maccatalyst' or '$(TargetOS)' == 'iossimulator' or '$(TargetOS)' == 'ios' or '$(TargetOS)' == 'tvossimulator' or '$(TargetOS)' == 'tvos' or '$(TargetOS)' == 'freebsd') and ('$(TargetArchitecture)' == 'x64' or '$(TargetArchitecture)' == 'arm64')">true</NativeAotSupported>
<Crossgen2Supported Condition="'$(TargetArchitecture)' != 'loongarch64'">true</Crossgen2Supported>

<!-- If we're building clr.nativeaotlibs and not building the CLR runtime, compile libraries against NativeAOT CoreLib -->
<UseNativeAotCoreLib Condition="'$(TestNativeAot)' == 'true' or ($(_subset.Contains('+clr.nativeaotlibs+')) and !$(_subset.Contains('+clr.native+')) and !$(_subset.Contains('+clr.runtime+')))">true</UseNativeAotCoreLib>
Expand Down Expand Up @@ -365,7 +366,7 @@
Test="true" Category="tools"/>
</ItemGroup>

<ItemGroup Condition="$(_subset.Contains('+clr.nativecorelib+'))">
<ItemGroup Condition="$(_subset.Contains('+clr.nativecorelib+')) and '$(Crossgen2Supported)' == 'true'">
Copy link
Member

Choose a reason for hiding this comment

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

This seems obsolete with the crossgen-corelib change

<!-- Build crossgen2 that will be used to compile System.Private.CoreLib library for CoreCLR -->
<ProjectToBuild Condition="('$(CrossBuild)' == 'true' or '$(BuildArchitecture)' != '$(TargetArchitecture)') and '$(BuildArchitecture)' == 'x64'" Include="$(CoreClrProjectRoot)tools\aot\crossgen2\crossgen2_crossarch.csproj" Category="clr" />
<ProjectToBuild Condition="!(('$(CrossBuild)' == 'true' or '$(BuildArchitecture)' != '$(TargetArchitecture)') and '$(BuildArchitecture)' == 'x64')" Include="$(CoreClrProjectRoot)tools\aot\crossgen2\crossgen2.csproj" Category="clr" />
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/crossgen-corelib.proj
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<CrossDir Condition="'$(CrossBuild)' == 'true' or '$(BuildArchitecture)' != '$(TargetArchitecture)'">$(BuildArchitecture)</CrossDir>

<BuildDll>true</BuildDll>
<BuildDll Condition="'$(TargetArchitecture)' == 'riscv64'">false</BuildDll>
<BuildDll Condition="'$(TargetArchitecture)' == 'riscv64' or '$(TargetArchitecture)' == 'loongarch64'">false</BuildDll>

<BuildPdb>false</BuildPdb>
<BuildPdb Condition="$(BuildDll) and '$(OS)' == 'Windows_NT' and '$(TargetOS)' == 'windows'">true</BuildPdb>
Expand Down
6 changes: 6 additions & 0 deletions src/libraries/tests.proj
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,12 @@
<ItemGroup Condition="'$(TargetOS)' == 'browser' and '$(RunDisabledWasmTests)' != 'true' and '$(RunAOTCompilation)' != 'true'">
</ItemGroup>

<ItemGroup Condition="$(TargetArchitecture) == 'loongarch64'">
<!-- 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>

<ItemGroup Condition="'$(TargetOS)' == 'browser' and '$(RunDisabledWasmTests)' != 'true'">
<ProjectExclusions Include="$(MSBuildThisFileDirectory)Microsoft.NETCore.Platforms\tests\Microsoft.NETCore.Platforms.Tests.csproj" />
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Runtime.InteropServices.JavaScript\tests\JSImportGenerator.UnitTest\JSImportGenerator.Unit.Tests.csproj" />
Expand Down
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 @@ -435,6 +436,7 @@
<Target Name="RestorePackage">
<PropertyGroup>
<_ConfigurationProperties>/p:TargetOS=$(TargetOS) /p:TargetArchitecture=$(TargetArchitecture) /p:Configuration=$(Configuration) /p:CrossBuild=$(CrossBuild)</_ConfigurationProperties>
<_ConfigurationProperties Condition="$(TargetArchitecture) == 'loongarch64'">$(_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