Improve/fix cross-build support. (#18658)
This commit is contained in:
parent
b503b6ae70
commit
4a54301016
2 changed files with 6 additions and 4 deletions
|
@ -50,11 +50,12 @@
|
||||||
<BuildRid Condition="'$(BuildRid)' == ''">$([System.Runtime.InteropServices.RuntimeInformation]::RuntimeIdentifier)</BuildRid>
|
<BuildRid Condition="'$(BuildRid)' == ''">$([System.Runtime.InteropServices.RuntimeInformation]::RuntimeIdentifier)</BuildRid>
|
||||||
|
|
||||||
<HostRid Condition="'$(HostRid)' == ''">$(BuildRid)</HostRid>
|
<HostRid Condition="'$(HostRid)' == ''">$(BuildRid)</HostRid>
|
||||||
<TargetRid Condition="'$(TargetRid)' == ''">$(BuildRid)</TargetRid>
|
<TargetRid Condition="'$(TargetRid)' == ''">$(BuildRid.Substring(0, $(BuildRid.LastIndexOf('-'))))-$(TargetArchitecture)</TargetRid>
|
||||||
|
|
||||||
<!-- Source-only builds are non portable. -->
|
<!-- Source-only builds are non portable, except for cross-builds.
|
||||||
<PortableBuild Condition="'$(PortableBuild)' == '' and '$(DotNetBuildSourceOnly)' != 'true'">true</PortableBuild>
|
Source-only cross-builds default to the portable configuration so the resulting SDK works on a wider range of distros. -->
|
||||||
<PortableBuild Condition="'$(PortableBuild)' == ''">false</PortableBuild>
|
<PortableBuild Condition="'$(PortableBuild)' == '' and '$(DotNetBuildSourceOnly)' == 'true' and '$(HostArchitecture)' == '$(TargetArchitecture)'">false</PortableBuild>
|
||||||
|
<PortableBuild Condition="'$(PortableBuild)' == ''">true</PortableBuild>
|
||||||
|
|
||||||
<PortableRid Condition="'$(__PortableTargetOS)' != ''">$(__PortableTargetOS)-$(TargetArchitecture)</PortableRid>
|
<PortableRid Condition="'$(__PortableTargetOS)' != ''">$(__PortableTargetOS)-$(TargetArchitecture)</PortableRid>
|
||||||
<PortableRid Condition="'$(PortableRid)' == '' and '$(TargetOS)' == 'freebsd'">freebsd-$(TargetArchitecture)</PortableRid>
|
<PortableRid Condition="'$(PortableRid)' == '' and '$(TargetOS)' == 'freebsd'">freebsd-$(TargetArchitecture)</PortableRid>
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
<BuildArgs>$(BuildArgs) /p:OSName=$(OSNameOverride)</BuildArgs>
|
<BuildArgs>$(BuildArgs) /p:OSName=$(OSNameOverride)</BuildArgs>
|
||||||
<BuildArgs>$(BuildArgs) /p:PortableOSName=$(__PortableTargetOS)</BuildArgs>
|
<BuildArgs>$(BuildArgs) /p:PortableOSName=$(__PortableTargetOS)</BuildArgs>
|
||||||
<BuildArgs>$(BuildArgs) /p:Rid=$(TargetRid)</BuildArgs>
|
<BuildArgs>$(BuildArgs) /p:Rid=$(TargetRid)</BuildArgs>
|
||||||
|
<BuildArgs>$(BuildArgs) /p:Architecture=$(TargetArchitecture)</BuildArgs>
|
||||||
<BuildArgs>$(BuildArgs) /p:DOTNET_INSTALL_DIR=$(DotNetRoot)</BuildArgs>
|
<BuildArgs>$(BuildArgs) /p:DOTNET_INSTALL_DIR=$(DotNetRoot)</BuildArgs>
|
||||||
|
|
||||||
<BuildArgs Condition="'$(TargetOS)' != 'windows'">$(BuildArgs) /p:AspNetCoreInstallerRid=$(TargetRid)</BuildArgs>
|
<BuildArgs Condition="'$(TargetOS)' != 'windows'">$(BuildArgs) /p:AspNetCoreInstallerRid=$(TargetRid)</BuildArgs>
|
||||||
|
|
Loading…
Reference in a new issue