Skip to content

Commit a8df810

Browse files
committed
Enable building on arm64
This chnage allows source-build to be cloned and built on arm64 machines. I have tested this on RHEL 8 aarch64. This change includes backports of the following pull-requests which have been merged into their respective master branches: - dotnet/aspnetcore#14790 - dotnet/aspnetcore#15354 - dotnet/installer#4102 - dotnet/core-setup#8468 - dotnet/corefx#40453
1 parent 3aaca4d commit a8df810

14 files changed

+411
-19
lines changed

build-source-tarball.sh

Lines changed: 36 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,32 @@ if [ -z "${1:-}" ]; then
1212
exit 1
1313
fi
1414

15+
# Use uname to determine what the CPU is.
16+
cpuname=$(uname -p)
17+
# Some Linux platforms report unknown for platform, but the arch for machine.
18+
if [[ "$cpuname" == "unknown" ]]; then
19+
cpuname=$(uname -m)
20+
fi
21+
22+
case $cpuname in
23+
aarch64)
24+
buildArch=arm64
25+
;;
26+
amd64|x86_64)
27+
buildArch=x64
28+
;;
29+
armv7l)
30+
buildArch=arm
31+
;;
32+
i686)
33+
buildArch=x86
34+
;;
35+
*)
36+
echo "Unknown CPU $cpuname detected, treating it as x64"
37+
buildArch=x64
38+
;;
39+
esac
40+
1541
TARBALL_ROOT=$1
1642
shift
1743

@@ -208,28 +234,28 @@ cp $SCRIPT_ROOT/support/tarball/build.sh $TARBALL_ROOT/build.sh
208234
mkdir -p $TARBALL_ROOT/packages/prebuilt
209235
mkdir -p $TARBALL_ROOT/packages/source-built
210236
find $SCRIPT_ROOT/packages/restored/ -name '*.nupkg' -exec cp {} $TARBALL_ROOT/packages/prebuilt/ \;
211-
find $SCRIPT_ROOT/bin/obj/x64/Release/nuget-packages -name '*.nupkg' -exec cp {} $TARBALL_ROOT/packages/prebuilt/ \;
237+
find $SCRIPT_ROOT/bin/obj/$buildArch/Release/nuget-packages -name '*.nupkg' -exec cp {} $TARBALL_ROOT/packages/prebuilt/ \;
212238

213239
# Copy reference-packages from bin dir to reference-packages directory.
214240
# See corresponding change in dir.props to change ReferencePackagesBasePath conditionally in offline build.
215241
mkdir -p $TARBALL_ROOT/packages/reference
216-
cp -r $SCRIPT_ROOT/bin/obj/x64/Release/reference-packages/source $TARBALL_ROOT/packages/reference/source
217-
cp -r $SCRIPT_ROOT/bin/obj/x64/Release/reference-packages/staging $TARBALL_ROOT/packages/reference/staging
242+
cp -r $SCRIPT_ROOT/bin/obj/$buildArch/Release/reference-packages/source $TARBALL_ROOT/packages/reference/source
243+
cp -r $SCRIPT_ROOT/bin/obj/$buildArch/Release/reference-packages/staging $TARBALL_ROOT/packages/reference/staging
218244

219245
# Copy tarballs to ./packages/archive directory
220246
mkdir -p $TARBALL_ROOT/packages/archive
221-
cp -r $SCRIPT_ROOT/bin/obj/x64/Release/external-tarballs/*.tar.gz $TARBALL_ROOT/packages/archive/
247+
cp -r $SCRIPT_ROOT/bin/obj/$buildArch/Release/external-tarballs/*.tar.gz $TARBALL_ROOT/packages/archive/
222248

223249
# Copy generated source from bin to src/generatedSrc
224-
cp -r $SCRIPT_ROOT/bin/obj/x64/Release/generatedSrc $TARBALL_ROOT/src/generatedSrc
250+
cp -r $SCRIPT_ROOT/bin/obj/$buildArch/Release/generatedSrc $TARBALL_ROOT/src/generatedSrc
225251

226252
if [ -e $SCRIPT_ROOT/testing-smoke/smoke-test-packages ]; then
227253
cp -rf $SCRIPT_ROOT/testing-smoke/smoke-test-packages $TARBALL_ROOT/packages
228254
fi
229255

230256
echo 'Removing source-built packages from tarball prebuilts...'
231257

232-
for built_package in $(find $SCRIPT_ROOT/bin/obj/x64/Release/blob-feed/packages/ -name '*.nupkg' | tr '[:upper:]' '[:lower:]')
258+
for built_package in $(find $SCRIPT_ROOT/bin/obj/$buildArch/Release/blob-feed/packages/ -name '*.nupkg' | tr '[:upper:]' '[:lower:]')
233259
do
234260
if [ -e $TARBALL_ROOT/packages/prebuilt/$(basename $built_package) ]; then
235261
rm $TARBALL_ROOT/packages/prebuilt/$(basename $built_package)
@@ -250,8 +276,8 @@ cp $SCRIPT_ROOT/bin/obj/x64/Release/blob-feed/packages/*DotNetHost*.nupkg $TARBA
250276
cp $SCRIPT_ROOT/bin/obj/x64/Release/blob-feed/packages/*DotNetAppHost*.nupkg $TARBALL_ROOT/packages/source-built/
251277

252278
# Setup package version props to include both source-built and running PackageVersions.props
253-
mkdir --parents $TARBALL_ROOT/bin/obj/x64/Release/
254-
cp $SCRIPT_ROOT/support/tarball/PackageVersions.props $TARBALL_ROOT/bin/obj/x64/Release/
279+
mkdir --parents $TARBALL_ROOT/bin/obj/$buildArch/Release/
280+
cp $SCRIPT_ROOT/support/tarball/PackageVersions.props $TARBALL_ROOT/bin/obj/$buildArch/Release/
255281

256282
if [ $INCLUDE_LEAK_DETECTION -eq 1 ]; then
257283
echo 'Building leak detection MSBuild tasks...'
@@ -261,7 +287,7 @@ fi
261287

262288
echo 'Removing reference-only packages from tarball prebuilts...'
263289

264-
for ref_package in $(find $SCRIPT_ROOT/bin/obj/x64/Release/reference-packages/packages-to-delete/ -name '*.nupkg' | tr '[:upper:]' '[:lower:]')
290+
for ref_package in $(find $SCRIPT_ROOT/bin/obj/$buildArch/Release/reference-packages/packages-to-delete/ -name '*.nupkg' | tr '[:upper:]' '[:lower:]')
265291
do
266292
if [ -e $TARBALL_ROOT/packages/prebuilt/$(basename $ref_package) ]; then
267293
rm $TARBALL_ROOT/packages/prebuilt/$(basename $ref_package)
@@ -292,7 +318,7 @@ done
292318
echo 'Removing source-built, previously source-built packages and reference packages from il pkg src...'
293319
OLDIFS=$IFS
294320

295-
allBuiltPkgs=(`ls $SCRIPT_ROOT/bin/obj/x64/Release/blob-feed/packages/*.nupkg | xargs -n1 basename | tr '[:upper:]' '[:lower:]'`)
321+
allBuiltPkgs=(`ls $SCRIPT_ROOT/bin/obj/$buildArch/Release/blob-feed/packages/*.nupkg | xargs -n1 basename | tr '[:upper:]' '[:lower:]'`)
296322
pushd $TARBALL_ROOT/packages/reference/staging/
297323
ilSrcPaths=(`find . -maxdepth 2 -mindepth 2`)
298324
popd

dir.props

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<PropertyGroup>
44
<Configuration Condition="$(Configuration) == ''">Release</Configuration>
5+
6+
<BuildArchitecture>$([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture.ToString().ToLowerInvariant())</BuildArchitecture>
7+
<Platform Condition="'$(Platform)' == '' AND '$(BuildArchitecture)' == 'arm64'">$(BuildArchitecture)</Platform>
58
<Platform Condition="'$(Platform)' == ''">x64</Platform>
69

710
<!-- true if we have bootstrapped buildtools (usually on an unsupported platform -->
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
From 84d274a8f3d416b0a5bd999e3d1c43ae1535e38f Mon Sep 17 00:00:00 2001
2+
From: Omair Majid <[email protected]>
3+
Date: Wed, 23 Oct 2019 15:43:57 -0400
4+
Subject: [PATCH] Support global.json on arm64 as well
5+
6+
arcade uses the runtime section of global.json to decide which
7+
architecture + runtime combination needs to be installed.
8+
9+
With https://github.com/dotnet/arcade/pull/4132 arcade can install
10+
foreign SDKs in separate locations correctly.
11+
12+
This change, suggested by @dougbu, makes arcade always install the
13+
runtime for the local architecture (which means it should work on arm64
14+
and x64) as well as the x86 architecture (skipped on Linux).
15+
16+
This gets us a working SDK/Runtime combo on arm64.
17+
---
18+
global.json | 2 +-
19+
1 file changed, 1 insertion(+), 1 deletion(-)
20+
21+
diff --git a/global.json b/global.json
22+
index 602f4f44e17..40dec559cc9 100644
23+
--- a/global.json
24+
+++ b/global.json
25+
@@ -5,7 +5,7 @@
26+
"tools": {
27+
"dotnet": "3.0.100-preview8-013656",
28+
"runtimes": {
29+
- "dotnet/x64": [
30+
+ "dotnet": [
31+
"$(MicrosoftNETCoreAppRuntimeVersion)"
32+
],
33+
"dotnet/x86": [
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
From e2946a26c11be7f7f0c223721a5b14f58f2ea240 Mon Sep 17 00:00:00 2001
2+
From: Omair Majid <[email protected]>
3+
Date: Mon, 11 Nov 2019 13:37:40 -0500
4+
Subject: [PATCH] Support building for arm64 on arm64 (*nix)
5+
6+
This commit allows ASP.NET Core to be built on arm64 machines directly,
7+
without relying on cross-compilation.
8+
9+
There's a few changes in here:
10+
11+
1. Ask msbuild to look into the BuildArchitecture
12+
13+
By default, our build systems assums the machine is x64. This
14+
modifies the build configuration to check the architecture of the
15+
currently running build machine, and set BuildArchitecture to that.
16+
17+
2. Fix crossgen in Microsoft.AspNetCore.App.Runtime
18+
19+
We run crossgen for supported architectures (including x64 and
20+
arm64). For that, we need a jit that we can point crossgen to.
21+
Generally, we can rely on the build scripts to find the right
22+
`libclrjit.so`. However, arm64 has multiple `libclirjit.so`, for
23+
different use-cases. There's one for arm64 (for running on arm64) and
24+
there's another one for cross-compiling for arm64 on x64. We need to
25+
figure out and use the right one explicitly rather than assuming the
26+
right one gets picked up.
27+
28+
See https://github.com/dotnet/core-setup/pull/8468 for similar
29+
changes made in core-setup.
30+
31+
This also needs https://github.com/aspnet/AspNetCore/pull/14790 to fully
32+
work on arm64.
33+
---
34+
Directory.Build.props | 1 +
35+
.../src/Microsoft.AspNetCore.App.Runtime.csproj | 12 ++++++++----
36+
2 files changed, 9 insertions(+), 4 deletions(-)
37+
38+
diff --git a/Directory.Build.props b/Directory.Build.props
39+
index b3dc903387f..1bd59d73121 100644
40+
--- a/Directory.Build.props
41+
+++ b/Directory.Build.props
42+
@@ -108,6 +108,7 @@
43+
<TargetOsName Condition=" '$(TargetOsName)' == '' AND $([MSBuild]::IsOSPlatform('Windows'))">win</TargetOsName>
44+
<TargetOsName Condition=" '$(TargetOsName)' == '' AND $([MSBuild]::IsOSPlatform('OSX'))">osx</TargetOsName>
45+
<TargetOsName Condition=" '$(TargetOsName)' == '' AND $([MSBuild]::IsOSPlatform('Linux'))">linux</TargetOsName>
46+
+ <BuildArchitecture>$([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture.ToString().ToLowerInvariant())</BuildArchitecture>
47+
<TargetArchitecture Condition="'$(TargetArchitecture)' == ''">x64</TargetArchitecture>
48+
<TargetRuntimeIdentifier>$(TargetOsName)-$(TargetArchitecture)</TargetRuntimeIdentifier>
49+
50+
diff --git a/src/Framework/src/Microsoft.AspNetCore.App.Runtime.csproj b/src/Framework/src/Microsoft.AspNetCore.App.Runtime.csproj
51+
index 4c4298a92da..f843ded1241 100644
52+
--- a/src/Framework/src/Microsoft.AspNetCore.App.Runtime.csproj
53+
+++ b/src/Framework/src/Microsoft.AspNetCore.App.Runtime.csproj
54+
@@ -90,15 +90,17 @@ This package is an internal implementation of the .NET Core SDK and is not meant
55+
<PathSeparator Condition="'$(PathSeparator)' == ''">:</PathSeparator>
56+
<PathSeparator Condition=" '$(TargetOsName)' == 'win' ">%3B</PathSeparator>
57+
58+
+ <CrossCompileDirectory Condition=" '$(TargetRuntimeIdentifier)' == 'linux-arm' ">x64_arm</CrossCompileDirectory>
59+
+ <CrossCompileDirectory Condition=" '$(TargetArchitecture)' == 'arm64' AND '$(BuildArchitecture)' != 'arm64' ">x64_arm64</CrossCompileDirectory>
60+
+ <CrossCompileDirectory Condition=" '$(TargetRuntimeIdentifier)' == 'win-arm' ">x86_arm</CrossCompileDirectory>
61+
+
62+
<!-- Crossgen executable name -->
63+
<CrossgenToolFileName>crossgen</CrossgenToolFileName>
64+
<CrossgenToolFileName Condition=" '$(TargetOsName)' == 'win' ">$(CrossgenToolFileName).exe</CrossgenToolFileName>
65+
<!-- Default crossgen executable relative path -->
66+
<CrossgenToolPackagePath>$(CrossgenToolFileName)</CrossgenToolPackagePath>
67+
<!-- Disambiguated RID-specific crossgen executable relative path -->
68+
- <CrossgenToolPackagePath Condition=" '$(TargetRuntimeIdentifier)' == 'linux-arm' ">x64_arm\$(CrossgenToolPackagePath)</CrossgenToolPackagePath>
69+
- <CrossgenToolPackagePath Condition=" '$(TargetRuntimeIdentifier)' == 'linux-arm64' OR '$(TargetRuntimeIdentifier)' == 'linux-musl-arm64' ">x64_arm64\$(CrossgenToolPackagePath)</CrossgenToolPackagePath>
70+
- <CrossgenToolPackagePath Condition=" '$(TargetRuntimeIdentifier)' == 'win-arm' ">x86_arm\$(CrossgenToolPackagePath)</CrossgenToolPackagePath>
71+
+ <CrossgenToolPackagePath Condition=" '$(CrossCompileDirectory)' != '' ">$(CrossCompileDirectory)\$(CrossgenToolPackagePath)</CrossgenToolPackagePath>
72+
73+
<RuntimePackageRoot>$([System.IO.Path]::Combine('$(NuGetPackageRoot)', 'microsoft.netcore.app.runtime.$(RuntimeIdentifier)', '$(MicrosoftNETCoreAppRuntimeVersion)'))</RuntimePackageRoot>
74+
<RuntimePackageRoot>$([MSBuild]::EnsureTrailingSlash('$(RuntimePackageRoot)'))</RuntimePackageRoot>
75+
@@ -293,7 +295,9 @@ This package is an internal implementation of the .NET Core SDK and is not meant
76+
-->
77+
<PropertyGroup>
78+
<CrossgenToolDir>$(IntermediateOutputPath)crossgen\</CrossgenToolDir>
79+
- <CoreCLRJitPath>$(CrossgenToolDir)$(LibPrefix)clrjit$(LibExtension)</CoreCLRJitPath>
80+
+ <!-- Pick the right coreclr jit based on whether we are cross-compiling or not -->
81+
+ <CoreCLRJitPath Condition="'$(CrossCompileDirectory)' == ''">$(RuntimePackageRoot)runtimes\$(RuntimeIdentifier)\native\$(LibPrefix)clrjit$(LibExtension)</CoreCLRJitPath>
82+
+ <CoreCLRJitPath Condition="'$(CrossCompileDirectory)' != ''">$(RuntimepackageRoot)runtimes\$(CrossCompileDirectory)\native\$(LibPrefix)clrjit$(LibExtension)</CoreCLRJitPath>
83+
</PropertyGroup>
84+
85+
<ItemGroup>
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
From 4b5c617203cfb9d2c1b12995e12d819fba6d7b6f Mon Sep 17 00:00:00 2001
2+
From: Omair Majid <[email protected]>
3+
Date: Tue, 8 Oct 2019 17:02:29 -0400
4+
Subject: [PATCH] Enable building on arm64 machines
5+
6+
With this commit, I can build core-sdk on RHEL 8 on arm64 directly,
7+
without cross compilation.
8+
9+
Bump the sourcelink version to pick up the ability to parse git info
10+
without depending on libgit2sharp. This allows sourcelink to work on
11+
arm64. The version is the same as the one recently added to core-setup:
12+
https://github.com/dotnet/core-setup/pull/7696
13+
14+
Introduce a new 'BuildArchitecture' msbuild property that contains the host
15+
architecture (arm64, x64, etc). This is the architecture of the
16+
currently running machine, and may be different from the architecture we
17+
are targetting in the case of cross compilation.
18+
19+
There's a gotcha with BuildArchitecture: under Visual Studio (an x86) process,
20+
we generally want a x64 architecture. So try and restrict it to arm64 only.
21+
22+
Use BuildArchitecture to determine whether _crossDir and LibCLRJitRid need to
23+
be special-cased for arm64 or or not.
24+
---
25+
Directory.Build.props | 6 ++++++
26+
eng/Versions.props | 2 +-
27+
src/redist/targets/Crossgen.targets | 6 +++---
28+
src/redist/targets/GenerateLayout.targets | 4 ++--
29+
src/redist/targets/GetRuntimeInformation.targets | 1 -
30+
5 files changed, 12 insertions(+), 7 deletions(-)
31+
32+
diff --git a/Directory.Build.props b/Directory.Build.props
33+
index b65a72410..be3834859 100644
34+
--- a/Directory.Build.props
35+
+++ b/Directory.Build.props
36+
@@ -7,6 +7,12 @@
37+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
38+
</PropertyGroup>
39+
40+
+ <PropertyGroup>
41+
+ <BuildArchitecture>$([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture.ToString().ToLowerInvariant())</BuildArchitecture>
42+
+ <Architecture Condition="'$(BuildArchitecture)' == 'arm64'">$(BuildArchitecture)</Architecture>
43+
+ <Architecture Condition="'$(Architecture)' == ''">x64</Architecture>
44+
+ </PropertyGroup>
45+
+
46+
<PropertyGroup>
47+
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
48+
<DebugType>embedded</DebugType>
49+
diff --git a/eng/Versions.props b/eng/Versions.props
50+
index 344a325bf..37e478e72 100644
51+
--- a/eng/Versions.props
52+
+++ b/eng/Versions.props
53+
@@ -87,7 +87,7 @@
54+
<VersionToolsVersion>$(BuildTasksFeedToolVersion)</VersionToolsVersion>
55+
<DotnetDebToolVersion>2.0.0</DotnetDebToolVersion>
56+
<MicrosoftNETTestSdkVersion>15.8.0</MicrosoftNETTestSdkVersion>
57+
- <MicrosoftSourceLinkVersion>1.0.0-beta2-18618-05</MicrosoftSourceLinkVersion>
58+
+ <MicrosoftSourceLinkVersion>1.0.0-beta2-19367-01</MicrosoftSourceLinkVersion>
59+
</PropertyGroup>
60+
<PropertyGroup>
61+
<!-- pinned dependency. This package is not being produced outside of the 2.0 branch of corefx and should not change. -->
62+
diff --git a/src/redist/targets/Crossgen.targets b/src/redist/targets/Crossgen.targets
63+
index 8d3091307..931dff2d9 100644
64+
--- a/src/redist/targets/Crossgen.targets
65+
+++ b/src/redist/targets/Crossgen.targets
66+
@@ -5,14 +5,14 @@
67+
68+
<PropertyGroup>
69+
<RuntimeNETCoreAppPackageName>runtime.$(SharedFrameworkRid).microsoft.netcore.app</RuntimeNETCoreAppPackageName>
70+
- <_crossDir Condition="'$(Architecture)' == 'arm64'">/x64_arm64</_crossDir>
71+
+ <_crossDir Condition="'$(Architecture)' == 'arm64' and '$(BuildArchitecture)' != 'arm64'">/x64_arm64</_crossDir>
72+
<_crossDir Condition="'$(Architecture)' == 'arm' And '$(OSName)' == 'win'">/x86_arm</_crossDir>
73+
<_crossDir Condition="'$(Architecture)' == 'arm' And '$(OSName)' == 'linux'">/x64_arm</_crossDir>
74+
<CrossgenPath>$(NuGetPackageRoot)/$(RuntimeNETCoreAppPackageName)/$(MicrosoftNETCoreAppPackageVersion)/tools$(_crossDir)/crossgen$(ExeExtension)</CrossgenPath>
75+
- <LibCLRJitRid Condition="!$(Architecture.StartsWith('arm'))">$(SharedFrameworkRid)</LibCLRJitRid>
76+
- <LibCLRJitRid Condition="'$(Architecture)' == 'arm64'">x64_arm64</LibCLRJitRid>
77+
+ <LibCLRJitRid Condition="'$(Architecture)' == 'arm64' and '$(BuildArchitecture)' == 'x64'">x64_arm64</LibCLRJitRid>
78+
<LibCLRJitRid Condition="'$(Architecture)' == 'arm' And '$(OSName)' == 'win'">x86_arm</LibCLRJitRid>
79+
<LibCLRJitRid Condition="'$(Architecture)' == 'arm' And '$(OSName)' == 'linux'">x64_arm</LibCLRJitRid>
80+
+ <LibCLRJitRid Condition="'$(LibCLRJitRid)' == ''">$(SharedFrameworkRid)</LibCLRJitRid>
81+
<LibCLRJitPath>$(NuGetPackageRoot)/$(RuntimeNETCoreAppPackageName)/$(MicrosoftNETCoreAppPackageVersion)/runtimes/$(LibCLRJitRid)/native/$(DynamicLibPrefix)clrjit$(DynamicLibExtension)</LibCLRJitPath>
82+
<SharedFrameworkNameVersionPath>$(RedistLayoutPath)shared/$(SharedFrameworkName)/$(MicrosoftNETCoreAppRuntimewinx64PackageVersion)</SharedFrameworkNameVersionPath>
83+
<DIASymReaderCrossgenFilter>*</DIASymReaderCrossgenFilter>
84+
diff --git a/src/redist/targets/GenerateLayout.targets b/src/redist/targets/GenerateLayout.targets
85+
index d2a0b6fd1..a0bcf6f35 100644
86+
--- a/src/redist/targets/GenerateLayout.targets
87+
+++ b/src/redist/targets/GenerateLayout.targets
88+
@@ -25,11 +25,11 @@
89+
90+
<!-- Use the "x64" Rid when downloading Linux shared framework 'DEB' installer files. -->
91+
<SharedFrameworkInstallerFileRid>$(CoreSetupRid)</SharedFrameworkInstallerFileRid>
92+
- <SharedFrameworkInstallerFileRid Condition=" '$(IsDebianBaseDistro)' == 'true' OR '$(IsRPMBasedDistro)' == 'true' ">x64</SharedFrameworkInstallerFileRid>
93+
+ <SharedFrameworkInstallerFileRid Condition=" '$(IsDebianBaseDistro)' == 'true' OR '$(IsRPMBasedDistro)' == 'true' ">$(Architecture)</SharedFrameworkInstallerFileRid>
94+
95+
<!-- Use the "x64" Rid when downloading Linux runtime dependencies Debian package. -->
96+
<RuntimeDepsInstallerFileRid>$(CoreSetupRid)</RuntimeDepsInstallerFileRid>
97+
- <RuntimeDepsInstallerFileRid Condition=" '$(IsDebianBaseDistro)' == 'true' ">x64</RuntimeDepsInstallerFileRid>
98+
+ <RuntimeDepsInstallerFileRid Condition=" '$(IsDebianBaseDistro)' == 'true' ">$(Architecture)</RuntimeDepsInstallerFileRid>
99+
100+
<DownloadedSharedHostInstallerFileName Condition=" '$(InstallerExtension)' != '' ">dotnet-host$(InstallerStartSuffix)-$(SharedHostVersion)-$(SharedFrameworkInstallerFileRid)$(InstallerExtension)</DownloadedSharedHostInstallerFileName>
101+
<DownloadedHostFxrInstallerFileName Condition=" '$(InstallerExtension)' != '' ">dotnet-hostfxr$(InstallerStartSuffix)-$(HostFxrVersion)-$(SharedFrameworkInstallerFileRid)$(InstallerExtension)</DownloadedHostFxrInstallerFileName>
102+
diff --git a/src/redist/targets/GetRuntimeInformation.targets b/src/redist/targets/GetRuntimeInformation.targets
103+
index 3b14d1203..f49c7262f 100644
104+
--- a/src/redist/targets/GetRuntimeInformation.targets
105+
+++ b/src/redist/targets/GetRuntimeInformation.targets
106+
@@ -13,7 +13,6 @@
107+
<OSName Condition=" '$(OSName)' == '' AND '$(IsLinux)' == 'True' ">linux</OSName>
108+
<OSPlatform Condition=" '$(OSPlatform)' == '' AND '$(IsLinux)' == 'True' ">linux</OSPlatform>
109+
110+
- <Architecture Condition=" '$(Architecture)' == '' ">x64</Architecture>
111+
<Rid Condition=" '$(Rid)' == '' ">$(OSName)-$(Architecture)</Rid>
112+
</PropertyGroup>
113+
114+
--
115+
2.18.1
116+

0 commit comments

Comments
 (0)