17b5d95d8b
With this commit, I can build core-sdk on RHEL 8 on arm64 directly, without cross compilation. Bump the sourcelink version to pick up the ability to parse git info without depending on libgit2sharp. This allows sourcelink to work on arm64. The version is the same as the one recently added to core-setup: https://github.com/dotnet/core-setup/pull/7696 Introduce a new 'BuildArchitecture' msbuild property that contains the host architecture (arm64, x64, etc). This is the architecture of the currently running machine, and may be different from the architecture we are targetting in the case of cross compilation. There's a gotcha with BuildArchitecture: under Visual Studio (an x86) process, we generally want a x64 architecture. So try and restrict it to arm64 only. Use BuildArchitecture to determine whether _crossDir and LibCLRJitRid need to be special-cased for arm64 or or not.
34 lines
1.4 KiB
XML
34 lines
1.4 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<Project>
|
|
<Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" />
|
|
|
|
<PropertyGroup Condition="'$(CopyrightNetFoundation)' != ''">
|
|
<Copyright>$(CopyrightNetFoundation)</Copyright>
|
|
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup>
|
|
<BuildArchitecture>$([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture.ToString().ToLowerInvariant())</BuildArchitecture>
|
|
<Architecture Condition="'$(Architecture)' == '' AND '$(BuildArchitecture)' == 'arm64'">$(BuildArchitecture)</Architecture>
|
|
<Architecture Condition="'$(Architecture)' == ''">x64</Architecture>
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup>
|
|
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
|
|
<DebugType>embedded</DebugType>
|
|
<DebugSymbols>true</DebugSymbols>
|
|
|
|
<IsShipping>true</IsShipping>
|
|
<CoreSdkTargetFramework>netcoreapp5.0</CoreSdkTargetFramework>
|
|
|
|
<NoWarn>NU5125;NU5105;NU1701</NoWarn>
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup Condition="'$(DisableSourceLink)' == 'true'">
|
|
<EnableSourceLink>false</EnableSourceLink>
|
|
<EnableSourceControlManagerQueries>false</EnableSourceControlManagerQueries>
|
|
<DeterministicSourcePaths>false</DeterministicSourcePaths>
|
|
<!-- Normally set by sourcelink, and needed by the Pack targets -->
|
|
<RepositoryUrl>https://github.com/dotnet/core-sdk</RepositoryUrl>
|
|
</PropertyGroup>
|
|
</Project>
|