Skip to content
Open
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: 3 additions & 0 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@
<PropertyGroup Condition="'$(BUILD_OS)' == 'Linux' AND '$(PackageRuntime)' == 'linux-arm64'">
<DefineConstants>$(DefineConstants);ARM64</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(BUILD_OS)' == 'Linux' AND '$(PackageRuntime)' == 'linux-loongarch64'">
<DefineConstants>$(DefineConstants);LOONGARCH64</DefineConstants>
</PropertyGroup>

<!-- Set TRACE/DEBUG vars -->
<PropertyGroup>
Expand Down
5 changes: 4 additions & 1 deletion src/Runner.Common/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ public enum Architecture
X86,
X64,
Arm,
Arm64
Arm64,
LoongArch64
}

public static class Runner
Expand All @@ -82,6 +83,8 @@ public static class Runner
public static readonly Architecture PlatformArchitecture = Architecture.Arm;
#elif ARM64
public static readonly Architecture PlatformArchitecture = Architecture.Arm64;
#elif LOONGARCH64
public static readonly Architecture PlatformArchitecture = Architecture.LoongArch64;
#else
public static readonly Architecture PlatformArchitecture = Architecture.X64;
#endif
Expand Down
2 changes: 2 additions & 0 deletions src/Runner.Common/Util/VarUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ public static string OSArchitecture
return "ARM";
case Constants.Architecture.Arm64:
return "ARM64";
case Constants.Architecture.LoongArch64:
return "LOONGARCH64";
default:
throw new NotSupportedException(); // Should never reach here.
}
Expand Down
1 change: 1 addition & 0 deletions src/Test/L0/ConstantGenerationL0.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public void BuildConstantGenerateSucceed()
"linux-x64",
"linux-arm",
"linux-arm64",
"linux-loongarch64",
"osx-x64",
"osx-arm64"
};
Expand Down