exit 1
}
-initDistroRid()
+initHostDistroRid()
{
if [ "$__HostOS" == "Linux" ]; then
if [ ! -e /etc/os-release ]; then
echo "WARNING: Can not determine runtime id for current distro."
- export __DistroRid=""
+ __HostDistroRid=""
else
source /etc/os-release
- export __DistroRid="$ID.$VERSION_ID-$__HostArch"
+ __HostDistroRid="$ID.$VERSION_ID-$__HostArch"
fi
fi
}
initTargetDistroRid()
{
- if [ "$__BuildOS" == "Linux" ]; then
- if [ ! -e /etc/os-release ]; then
- echo "WARNING: Can not determine runtime id for current distro."
- export __CrossDistroRid=""
- else
- source $ROOTFS_DIR/etc/os-release
- export __CrossDistroRid="$ID.$VERSION_ID-$__BuildArch"
+ if [ $__CrossBuild == 1 ]; then
+ if [ "$__BuildOS" == "Linux" ]; then
+ if [ ! -e $ROOTFS_DIR/etc/os-release ]; then
+ echo "WARNING: Can not determine runtime id for current distro."
+ export __DistroRid=""
+ else
+ source $ROOTFS_DIR/etc/os-release
+ export __DistroRid="$ID.$VERSION_ID-$__BuildArch"
+ fi
fi
+ else
+ export __DistroRid="$__HostDistroRid"
fi
}
if [ "$__HostArch" == "x64" ]; then
if [ "$__HostOS" == "Linux" ]; then
- case "$__DistroRid" in
+ case "$__HostDistroRid" in
"centos.7-x64")
__isMSBuildOnNETCoreSupported=1
;;
__ClangMajorVersion=0
__ClangMinorVersion=0
__NuGetPath="$__PackagesDir/NuGet.exe"
+__HostDistroRid=""
__DistroRid=""
__cmakeargs=""
__SkipGenerateVersion=0
# Set dependent variables
__LogsDir="$__RootBinDir/Logs"
-# init the distro name
-initDistroRid
+# init the host distro name
+initHostDistroRid
# Set the remaining variables based upon the determined build configuration
__BinDir="$__RootBinDir/Product/$__BuildOS.$__BuildArch.$__BuildType"
if ! [[ -n "$ROOTFS_DIR" ]]; then
export ROOTFS_DIR="$__ProjectRoot/cross/rootfs/$__BuildArch"
fi
- initTargetDistroRid
fi
+# init the target distro name
+initTargetDistroRid
+
# Make the directories necessary for build if they don't exist
setup_dirs
<TargetsWindows Condition="'$(BuildOS)' == 'Windows_NT'">true</TargetsWindows>
<TargetsUnix Condition="'$(TargetsFreeBSD)' == 'true' or '$(TargetsLinux)' == 'true' or '$(TargetsNetBSD)' == 'true' or '$(TargetsOSX)' == 'true'">true</TargetsUnix>
- <TargetsLinuxCross Condition="'$(TargetsLinux)' == 'true' and '$(CROSSCOMPILE)' != ''">true</TargetsLinuxCross>
<!-- We are only tracking Linux Distributions for Nuget RID mapping -->
- <DistroRid Condition="'$(TargetsLinux)' == 'true' and '$(TargetsLinuxCross)' != 'true'">$(__DistroRid)</DistroRid>
- <DistroRid Condition="'$(TargetsLinux)' == 'true' and '$(TargetsLinuxCross)' == 'true'">$(__CrossDistroRid)</DistroRid>
+ <DistroRid Condition="'$(TargetsLinux)' == 'true'">$(__DistroRid)</DistroRid>
</PropertyGroup>
<OSGroup>Linux</OSGroup>
<Platform>amd64</Platform>
</Project>
+ <Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroRid)' == 'ubuntu.14.04-arm'" Include="ubuntu/14.04/Microsoft.NETCore.ILAsm.pkgproj">
+ <OSGroup>Linux</OSGroup>
+ <Platform>arm</Platform>
+ </Project>
<Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroRid)' == 'ubuntu.16.04-x64'" Include="ubuntu/16.04/Microsoft.NETCore.ILAsm.pkgproj">
<OSGroup>Linux</OSGroup>
<Platform>amd64</Platform>
</Project>
+ <Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroRid)' == 'ubuntu.16.04-arm'" Include="ubuntu/16.04/Microsoft.NETCore.ILAsm.pkgproj">
+ <OSGroup>Linux</OSGroup>
+ <Platform>arm</Platform>
+ </Project>
<Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroRid)' == 'ubuntu.16.10-x64'" Include="ubuntu/16.10/Microsoft.NETCore.ILAsm.pkgproj">
<OSGroup>Linux</OSGroup>
<Platform>amd64</Platform>
<OSGroup>Linux</OSGroup>
<Platform>amd64</Platform>
</Project>
- <Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroRid)' == 'ubuntu.14.04-arm'" Include="ubuntu/14.04/Microsoft.NETCore.ILAsm.pkgproj">
- <OSGroup>Linux</OSGroup>
- <Platform>arm</Platform>
- </Project>
- <Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroRid)' == 'ubuntu.16.04-arm'" Include="ubuntu/16.04/Microsoft.NETCore.ILAsm.pkgproj">
- <OSGroup>Linux</OSGroup>
- <Platform>arm</Platform>
- </Project>
<Project Condition="'$(TargetsOSX)' == 'true'" Include="osx/Microsoft.NETCore.ILAsm.pkgproj">
<OSGroup>OSX</OSGroup>
<Platform>amd64</Platform>
<ProjectReference Include="ubuntu\14.04\Microsoft.NETCore.ILAsm.pkgproj">
<Platform>amd64</Platform>
</ProjectReference>
+ <ProjectReference Include="ubuntu\14.04\Microsoft.NETCore.ILAsm.pkgproj">
+ <Platform>arm</Platform>
+ </ProjectReference>
<ProjectReference Include="ubuntu\16.04\Microsoft.NETCore.ILAsm.pkgproj">
<Platform>amd64</Platform>
</ProjectReference>
+ <ProjectReference Include="ubuntu\16.04\Microsoft.NETCore.ILAsm.pkgproj">
+ <Platform>arm</Platform>
+ </ProjectReference>
<ProjectReference Include="ubuntu\16.10\Microsoft.NETCore.ILAsm.pkgproj">
<Platform>amd64</Platform>
</ProjectReference>
<ProjectReference Include="alpine\3.4.3\Microsoft.NETCore.ILAsm.pkgproj">
<Platform>amd64</Platform>
</ProjectReference>
- <ProjectReference Include="ubuntu\14.04\Microsoft.NETCore.ILAsm.pkgproj">
- <Platform>arm</Platform>
- </ProjectReference>
- <ProjectReference Include="ubuntu\16.04\Microsoft.NETCore.ILAsm.pkgproj">
- <Platform>arm</Platform>
- </ProjectReference>
<ProjectReference Include="osx\Microsoft.NETCore.ILAsm.pkgproj">
<Platform>amd64</Platform>
</ProjectReference>
<OSGroup>Linux</OSGroup>
<Platform>amd64</Platform>
</Project>
+ <Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroRid)' == 'ubuntu.14.04-arm'" Include="ubuntu/14.04/Microsoft.NETCore.ILDAsm.pkgproj">
+ <OSGroup>Linux</OSGroup>
+ <Platform>arm</Platform>
+ </Project>
<Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroRid)' == 'ubuntu.16.04-x64'" Include="ubuntu/16.04/Microsoft.NETCore.ILDAsm.pkgproj">
<OSGroup>Linux</OSGroup>
<Platform>amd64</Platform>
</Project>
+ <Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroRid)' == 'ubuntu.16.04-arm'" Include="ubuntu/16.04/Microsoft.NETCore.ILDAsm.pkgproj">
+ <OSGroup>Linux</OSGroup>
+ <Platform>arm</Platform>
+ </Project>
<Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroRid)' == 'ubuntu.16.10-x64'" Include="ubuntu/16.10/Microsoft.NETCore.ILDAsm.pkgproj">
<OSGroup>Linux</OSGroup>
<Platform>amd64</Platform>
<OSGroup>Linux</OSGroup>
<Platform>amd64</Platform>
</Project>
- <Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroRid)' == 'ubuntu.14.04-arm'" Include="ubuntu/14.04/Microsoft.NETCore.ILDAsm.pkgproj">
- <OSGroup>Linux</OSGroup>
- <Platform>arm</Platform>
- </Project>
- <Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroRid)' == 'ubuntu.16.04-arm'" Include="ubuntu/16.04/Microsoft.NETCore.ILDAsm.pkgproj">
- <OSGroup>Linux</OSGroup>
- <Platform>arm</Platform>
- </Project>
<Project Condition="'$(TargetsOSX)' == 'true'" Include="osx/Microsoft.NETCore.ILDAsm.pkgproj">
<OSGroup>OSX</OSGroup>
<Platform>amd64</Platform>
<ProjectReference Include="ubuntu\14.04\Microsoft.NETCore.ILDAsm.pkgproj">
<Platform>amd64</Platform>
</ProjectReference>
+ <ProjectReference Include="ubuntu\14.04\Microsoft.NETCore.ILDAsm.pkgproj">
+ <Platform>arm</Platform>
+ </ProjectReference>
<ProjectReference Include="ubuntu\16.04\Microsoft.NETCore.ILDAsm.pkgproj">
<Platform>amd64</Platform>
</ProjectReference>
+ <ProjectReference Include="ubuntu\16.04\Microsoft.NETCore.ILDAsm.pkgproj">
+ <Platform>arm</Platform>
+ </ProjectReference>
<ProjectReference Include="ubuntu\16.10\Microsoft.NETCore.ILDAsm.pkgproj">
<Platform>amd64</Platform>
</ProjectReference>
<ProjectReference Include="alpine\3.4.3\Microsoft.NETCore.ILDAsm.pkgproj">
<Platform>amd64</Platform>
</ProjectReference>
- <ProjectReference Include="ubuntu\14.04\Microsoft.NETCore.ILDAsm.pkgproj">
- <Platform>arm</Platform>
- </ProjectReference>
- <ProjectReference Include="ubuntu\16.04\Microsoft.NETCore.ILDAsm.pkgproj">
- <Platform>arm</Platform>
- </ProjectReference>
<ProjectReference Include="osx\Microsoft.NETCore.ILDAsm.pkgproj">
<Platform>amd64</Platform>
</ProjectReference>
<OSGroup>Linux</OSGroup>
<Platform>amd64</Platform>
</Project>
+ <Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroRid)' == 'ubuntu.14.04-arm'" Include="ubuntu/14.04/Microsoft.NETCore.Jit.pkgproj">
+ <OSGroup>Linux</OSGroup>
+ <Platform>arm</Platform>
+ </Project>
<Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroRid)' == 'ubuntu.16.04-x64'" Include="ubuntu/16.04/Microsoft.NETCore.Jit.pkgproj">
<OSGroup>Linux</OSGroup>
<Platform>amd64</Platform>
</Project>
+ <Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroRid)' == 'ubuntu.16.04-arm'" Include="ubuntu/16.04/Microsoft.NETCore.Jit.pkgproj">
+ <OSGroup>Linux</OSGroup>
+ <Platform>arm</Platform>
+ </Project>
<Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroRid)' == 'ubuntu.16.10-x64'" Include="ubuntu/16.10/Microsoft.NETCore.Jit.pkgproj">
<OSGroup>Linux</OSGroup>
<Platform>amd64</Platform>
<OSGroup>Linux</OSGroup>
<Platform>amd64</Platform>
</Project>
- <Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroRid)' == 'ubuntu.14.04-arm'" Include="ubuntu/14.04/Microsoft.NETCore.Jit.pkgproj">
- <OSGroup>Linux</OSGroup>
- <Platform>arm</Platform>
- </Project>
- <Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroRid)' == 'ubuntu.16.04-arm'" Include="ubuntu/16.04/Microsoft.NETCore.Jit.pkgproj">
- <OSGroup>Linux</OSGroup>
- <Platform>arm</Platform>
- </Project>
<Project Condition="'$(TargetsOSX)' == 'true'" Include="osx/Microsoft.NETCore.Jit.pkgproj">
<OSGroup>OSX</OSGroup>
<Platform>amd64</Platform>
<ProjectReference Include="ubuntu\14.04\Microsoft.NETCore.Jit.pkgproj">
<Platform>amd64</Platform>
</ProjectReference>
+ <ProjectReference Include="ubuntu\14.04\Microsoft.NETCore.Jit.pkgproj">
+ <Platform>arm</Platform>
+ </ProjectReference>
<ProjectReference Include="ubuntu\16.04\Microsoft.NETCore.Jit.pkgproj">
<Platform>amd64</Platform>
</ProjectReference>
+ <ProjectReference Include="ubuntu\16.04\Microsoft.NETCore.Jit.pkgproj">
+ <Platform>arm</Platform>
+ </ProjectReference>
<ProjectReference Include="ubuntu\16.10\Microsoft.NETCore.Jit.pkgproj">
<Platform>amd64</Platform>
</ProjectReference>
<ProjectReference Include="alpine\3.4.3\Microsoft.NETCore.Jit.pkgproj">
<Platform>amd64</Platform>
</ProjectReference>
- <ProjectReference Include="ubuntu\14.04\Microsoft.NETCore.Jit.pkgproj">
- <Platform>arm</Platform>
- </ProjectReference>
- <ProjectReference Include="ubuntu\16.04\Microsoft.NETCore.Jit.pkgproj">
- <Platform>arm</Platform>
- </ProjectReference>
<ProjectReference Include="osx\Microsoft.NETCore.Jit.pkgproj">
<Platform>amd64</Platform>
</ProjectReference>
<OSGroup>Linux</OSGroup>
<Platform>amd64</Platform>
</Project>
+ <Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroRid)' == 'ubuntu.14.04-arm'" Include="ubuntu/14.04/Microsoft.NETCore.Runtime.CoreCLR.pkgproj">
+ <OSGroup>Linux</OSGroup>
+ <Platform>arm</Platform>
+ </Project>
<Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroRid)' == 'ubuntu.16.04-x64'" Include="ubuntu/16.04/Microsoft.NETCore.Runtime.CoreCLR.pkgproj">
<OSGroup>Linux</OSGroup>
<Platform>amd64</Platform>
</Project>
+ <Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroRid)' == 'ubuntu.16.04-arm'" Include="ubuntu/16.04/Microsoft.NETCore.Runtime.CoreCLR.pkgproj">
+ <OSGroup>Linux</OSGroup>
+ <Platform>arm</Platform>
+ </Project>
<Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroRid)' == 'ubuntu.16.10-x64'" Include="ubuntu/16.10/Microsoft.NETCore.Runtime.CoreCLR.pkgproj">
<OSGroup>Linux</OSGroup>
<Platform>amd64</Platform>
<OSGroup>Linux</OSGroup>
<Platform>amd64</Platform>
</Project>
- <Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroRid)' == 'ubuntu.14.04-arm'" Include="ubuntu/14.04/Microsoft.NETCore.Runtime.CoreCLR.pkgproj">
- <OSGroup>Linux</OSGroup>
- <Platform>arm</Platform>
- </Project>
- <Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroRid)' == 'ubuntu.16.04-arm'" Include="ubuntu/16.04/Microsoft.NETCore.Runtime.CoreCLR.pkgproj">
- <OSGroup>Linux</OSGroup>
- <Platform>arm</Platform>
- </Project>
<Project Condition="'$(TargetsOSX)' == 'true'" Include="osx/Microsoft.NETCore.Runtime.CoreCLR.pkgproj">
<OSGroup>OSX</OSGroup>
<Platform>amd64</Platform>
<ProjectReference Include="ubuntu\14.04\Microsoft.NETCore.Runtime.CoreCLR.pkgproj">
<Platform>amd64</Platform>
</ProjectReference>
+ <ProjectReference Include="ubuntu\14.04\Microsoft.NETCore.Runtime.CoreCLR.pkgproj">
+ <Platform>arm</Platform>
+ </ProjectReference>
<ProjectReference Include="ubuntu\16.04\Microsoft.NETCore.Runtime.CoreCLR.pkgproj">
<Platform>amd64</Platform>
</ProjectReference>
+ <ProjectReference Include="ubuntu\16.04\Microsoft.NETCore.Runtime.CoreCLR.pkgproj">
+ <Platform>arm</Platform>
+ </ProjectReference>
<ProjectReference Include="ubuntu\16.10\Microsoft.NETCore.Runtime.CoreCLR.pkgproj">
<Platform>amd64</Platform>
</ProjectReference>
<ProjectReference Include="alpine\3.4.3\Microsoft.NETCore.Runtime.CoreCLR.pkgproj">
<Platform>amd64</Platform>
</ProjectReference>
- <ProjectReference Include="ubuntu\14.04\Microsoft.NETCore.Runtime.CoreCLR.pkgproj">
- <Platform>arm</Platform>
- </ProjectReference>
- <ProjectReference Include="ubuntu\16.04\Microsoft.NETCore.Runtime.CoreCLR.pkgproj">
- <Platform>arm</Platform>
- </ProjectReference>
<ProjectReference Include="osx\Microsoft.NETCore.Runtime.CoreCLR.pkgproj">
<Platform>amd64</Platform>
</ProjectReference>
<OSGroup>Linux</OSGroup>
<Platform>amd64</Platform>
</Project>
+ <Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroRid)' == 'ubuntu.14.04-arm'" Include="ubuntu/14.04/Microsoft.NETCore.TestHost.pkgproj">
+ <OSGroup>Linux</OSGroup>
+ <Platform>arm</Platform>
+ </Project>
<Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroRid)' == 'ubuntu.16.04-x64'" Include="ubuntu/16.04/Microsoft.NETCore.TestHost.pkgproj">
<OSGroup>Linux</OSGroup>
<Platform>amd64</Platform>
</Project>
+ <Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroRid)' == 'ubuntu.16.04-arm'" Include="ubuntu/16.04/Microsoft.NETCore.TestHost.pkgproj">
+ <OSGroup>Linux</OSGroup>
+ <Platform>arm</Platform>
+ </Project>
<Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroRid)' == 'ubuntu.16.10-x64'" Include="ubuntu/16.10/Microsoft.NETCore.TestHost.pkgproj">
<OSGroup>Linux</OSGroup>
<Platform>amd64</Platform>
<OSGroup>Linux</OSGroup>
<Platform>amd64</Platform>
</Project>
- <Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroRid)' == 'ubuntu.14.04-arm'" Include="ubuntu/14.04/Microsoft.NETCore.TestHost.pkgproj">
- <OSGroup>Linux</OSGroup>
- <Platform>arm</Platform>
- </Project>
- <Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroRid)' == 'ubuntu.16.04-arm'" Include="ubuntu/16.04/Microsoft.NETCore.TestHost.pkgproj">
- <OSGroup>Linux</OSGroup>
- <Platform>arm</Platform>
- </Project>
<Project Condition="'$(TargetsOSX)' == 'true'" Include="osx/Microsoft.NETCore.TestHost.pkgproj">
<OSGroup>OSX</OSGroup>
<Platform>amd64</Platform>
<ProjectReference Include="ubuntu\14.04\Microsoft.NETCore.TestHost.pkgproj">
<Platform>amd64</Platform>
</ProjectReference>
+ <ProjectReference Include="ubuntu\14.04\Microsoft.NETCore.TestHost.pkgproj">
+ <Platform>arm</Platform>
+ </ProjectReference>
<ProjectReference Include="ubuntu\16.04\Microsoft.NETCore.TestHost.pkgproj">
<Platform>amd64</Platform>
</ProjectReference>
+ <ProjectReference Include="ubuntu\16.04\Microsoft.NETCore.TestHost.pkgproj">
+ <Platform>arm</Platform>
+ </ProjectReference>
<ProjectReference Include="ubuntu\16.10\Microsoft.NETCore.TestHost.pkgproj">
<Platform>amd64</Platform>
</ProjectReference>
<ProjectReference Include="alpine\3.4.3\Microsoft.NETCore.TestHost.pkgproj">
<Platform>amd64</Platform>
</ProjectReference>
- <ProjectReference Include="ubuntu\14.04\Microsoft.NETCore.TestHost.pkgproj">
- <Platform>arm</Platform>
- </ProjectReference>
- <ProjectReference Include="ubuntu\16.04\Microsoft.NETCore.TestHost.pkgproj">
- <Platform>arm</Platform>
- </ProjectReference>
<ProjectReference Include="osx\Microsoft.NETCore.TestHost.pkgproj">
<Platform>amd64</Platform>
</ProjectReference>