summaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
authorGaurav Khanna <gkhanna@microsoft.com>2016-12-12 10:54:13 -0800
committerGitHub <noreply@github.com>2016-12-12 10:54:13 -0800
commite7d19194fa99aa97514d5e920e84afbc9721af0e (patch)
tree5405a261113f95aa114a1c540e39e473fea0b3fc /build.sh
parent98798b78e2e3284409289c7253bac7b999c0ad88 (diff)
parentda8cc3ac210f16bdf04aa04c94f50b7abd673fa4 (diff)
downloadcoreclr-e7d19194fa99aa97514d5e920e84afbc9721af0e.tar.gz
coreclr-e7d19194fa99aa97514d5e920e84afbc9721af0e.tar.bz2
coreclr-e7d19194fa99aa97514d5e920e84afbc9721af0e.zip
Merge pull request #8421 from hseok-oh/enable_arm_linux_nupkg
First step to create nuget packages for ARM32/Linux
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh35
1 files changed, 28 insertions, 7 deletions
diff --git a/build.sh b/build.sh
index 50cbc70ef3..d42bf37b96 100755
--- a/build.sh
+++ b/build.sh
@@ -56,19 +56,36 @@ usage()
exit 1
}
-initDistroRid()
+initHostDistroRid()
{
- if [ "$__BuildOS" == "Linux" ]; then
+ 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 [ $__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
+}
+
setup_dirs()
{
echo Setting up directories for build
@@ -234,7 +251,7 @@ isMSBuildOnNETCoreSupported()
if [ "$__HostArch" == "x64" ]; then
if [ "$__HostOS" == "Linux" ]; then
- case "$__DistroRid" in
+ case "$__HostDistroRid" in
"centos.7-x64")
__isMSBuildOnNETCoreSupported=1
;;
@@ -482,6 +499,7 @@ __CrossBuild=0
__ClangMajorVersion=0
__ClangMinorVersion=0
__NuGetPath="$__PackagesDir/NuGet.exe"
+__HostDistroRid=""
__DistroRid=""
__cmakeargs=""
__SkipGenerateVersion=0
@@ -670,8 +688,8 @@ fi
# 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"
@@ -707,6 +725,9 @@ if [ $__CrossBuild == 1 ]; then
fi
fi
+# init the target distro name
+initTargetDistroRid
+
# Make the directories necessary for build if they don't exist
setup_dirs