Skip to content

Add LoongArch64 support#15359

Merged
nohwnd merged 1 commit intomicrosoft:mainfrom
stdmnpkg:main
Jan 20, 2026
Merged

Add LoongArch64 support#15359
nohwnd merged 1 commit intomicrosoft:mainfrom
stdmnpkg:main

Conversation

@stdmnpkg
Copy link
Copy Markdown
Contributor

Description

add loongarch64 to architecture enums, which is supported by .NET >=9

Related issue

  • I have ensured that there is a previously discussed and approved issue.

@nohwnd
Copy link
Copy Markdown
Member

nohwnd commented Jan 14, 2026

lgtm please fix the formatting so it can build.

@stdmnpkg stdmnpkg force-pushed the main branch 2 times, most recently from 3c340c7 to f66d639 Compare January 15, 2026 01:13
@stdmnpkg
Copy link
Copy Markdown
Contributor Author

@microsoft-github-policy-service agree

@stdmnpkg stdmnpkg marked this pull request as ready for review January 15, 2026 16:39
@nohwnd
Copy link
Copy Markdown
Member

nohwnd commented Jan 16, 2026

Which hardware has that architecture and were you able to run it on that?

(closed runtime issue dotnet/runtime#59561)

@stdmnpkg
Copy link
Copy Markdown
Contributor Author

yes, CI generated package works on my loongarch64 desktop machine.

(ssh)studentmain@a-loong-loooooong-ago [ dotnet_demo ] $ cat Test1.cs
namespace dotnet_demo;

[TestClass]
public sealed class Test1
{
    [TestMethod]
    public void TestMethod1()
    {
    }
}
(ssh)studentmain@a-loong-loooooong-ago [ dotnet_demo ] $ cat dotnet_demo.csproj
<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFramework>net10.0</TargetFramework>
    <LangVersion>latest</LangVersion>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>
  </PropertyGroup>

  <ItemGroup>
    <Using Include="Microsoft.VisualStudio.TestTools.UnitTesting" />
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.TestPlatform" Version="18.4.0-ci" />
    <PackageReference Include="Microsoft.TestPlatform.ObjectModel" Version="18.4.0-ci" />
    <PackageReference Include="MSTest" Version="4.0.2" />
  </ItemGroup>

</Project>
(ssh)studentmain@a-loong-loooooong-ago [ dotnet_demo ] $ dotnet --list-sdks
10.0.100 [/usr/lib/dotnet/sdk]
(ssh)studentmain@a-loong-loooooong-ago [ dotnet_demo ] $ dotnet --list-runtimes
Microsoft.AspNetCore.App 10.0.0 [/usr/lib/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 10.0.0 [/usr/lib/dotnet/shared/Microsoft.NETCore.App]
(ssh)studentmain@a-loong-loooooong-ago [ dotnet_demo ] $ dotnet test
还原完成(0.6)
  dotnet_demo net10.0 已成功 (0.3 秒) → bin/Debug/net10.0/dotnet_demo.dll
  dotnet_demo 测试 net10.0 已成功 (1.4 秒)

测试摘要: 总计: 1, 失败: 0, 成功: 1, 已跳过: 0, 持续时间: 1.4 秒
在 3.1 秒内生成 已成功
(ssh)studentmain@a-loong-loooooong-ago [ dotnet_demo ] $ fastfetch
                __                          studentmain@a-loong-loooooong-ago
             gpBBBBBBBBBP                   ---------------------------------
         _gBBBBBBBBBRP                      OS: AOSC OS (13.0.4) loongarch64
       4BBBBBBBBRP  ,_____                  Host: Loongson-3A6000-HV-7A2000-XA61200
            `"" _g@@@@@@@@@@@@@%g>          Kernel: Linux 6.17.7-aosc-main-16k
            __@@@@@@@@@@@@@@@@P"  ___       Uptime: 14 days, 1 hour, 6 mins
         _g@@@@@@@@@@@@@@@N"` _gN@@@@@N^    Packages: 1536 (dpkg)
     _w@@@@@@@@@@@@@@@@P" _g@@@@@@@P"       Shell: bash 5.2.37
  _g@@@@@@@@@@@@@@@N"`  VMNN@NNNM^`         Display (PM1561P): 1920x1080 in 16", 60 Hz [External]
^MMM@@@@@@@@@@@MP" ,ggppww__                Terminal: /dev/pts/0
        `""""" _wNNNNNNNNNNNNNNNNNNN        CPU: Loongson-3A6000-HV (8) @ 2.50 GHz
            _gBNNNNNNNNNNNNNNNNNP"          GPU: Loongson 2K2000 / 7A2000 Chipset Display Controller
        _wNNNNNNNNNNNNNNNNNNMP`             Memory: 4.27 GiB / 31.63 GiB (13%)
     _gBNNNNNNNNNNNNNNNNNP"                 Swap: 52.75 MiB / 32.00 GiB (0%)
 _wNNNNNNNNNNNNNNNNNNNM^                    Disk (/): 147.24 GiB / 255.18 GiB (58%) - ext4
 ""Y^^MNNNNNNNNNNNNP`                       Local IP (enp2s0): 192.168.31.97/24
         `"""""""                           Locale: zh_CN.UTF-8

// preview 6 or later, so use the numerical value for now.
// case System.Runtime.InteropServices.Architecture.S390x:
(Architecture)5 => PlatformArchitecture.S390x,
(Architecture)6 => PlatformArchitecture.LoongArch64,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@nohwnd nohwnd merged commit 7c5988f into microsoft:main Jan 20, 2026
5 of 7 checks passed
This was referenced Apr 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants