summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Vorlicek <janvorli@microsoft.com>2017-09-14 04:52:39 +0200
committerJan Kotas <jkotas@microsoft.com>2017-09-13 19:52:39 -0700
commit8214509562a3686bcf878d4e54038ca883359bfc (patch)
tree6c4e8fe2268404507e1cb63dddb954f5d91a1799
parent929a45749a1dfabe8cf232398d8611ca6766135b (diff)
downloadcoreclr-8214509562a3686bcf878d4e54038ca883359bfc.tar.gz
coreclr-8214509562a3686bcf878d4e54038ca883359bfc.tar.bz2
coreclr-8214509562a3686bcf878d4e54038ca883359bfc.zip
Enable end to end Alpine build (#13966)
This change enables full end to end build of coreclr including managed code on Alpine Linux.
-rwxr-xr-xbuild.sh12
-rwxr-xr-xinit-tools.sh10
-rw-r--r--src/.nuget/dir.props1
3 files changed, 18 insertions, 5 deletions
diff --git a/build.sh b/build.sh
index 97a11c2b15..7fc2cb1107 100755
--- a/build.sh
+++ b/build.sh
@@ -42,9 +42,9 @@ usage()
echo "-skipcrossgen - skip native image generation"
echo "-verbose - optional argument to enable verbose build output."
echo "-skiprestore: skip restoring packages ^(default: packages are restored during build^)."
- echo "-disableoss: Disable Open Source Signing for System.Private.CoreLib."
- echo "-officialbuildid=^<ID^>: specify the official build ID to be used by this build."
- echo "-Rebuild: passes /t:rebuild to the build projects."
+ echo "-disableoss: Disable Open Source Signing for System.Private.CoreLib."
+ echo "-officialbuildid=^<ID^>: specify the official build ID to be used by this build."
+ echo "-Rebuild: passes /t:rebuild to the build projects."
echo "-stripSymbols - Optional argument to strip native symbols during the build."
echo "-skipgenerateversion - disable version generation even if MSBuild is supported."
echo "-ignorewarnings - do not treat warnings as errors"
@@ -62,6 +62,10 @@ initHostDistroRid()
if [ "$__HostOS" == "Linux" ]; then
if [ -e /etc/os-release ]; then
source /etc/os-release
+ if [[ $ID == "alpine" ]]; then
+ # remove the last version digit
+ VERSION_ID=${VERSION_ID%.*}
+ fi
__HostDistroRid="$ID.$VERSION_ID-$__HostArch"
elif [ -e /etc/redhat-release ]; then
local redhatRelease=$(</etc/redhat-release)
@@ -396,7 +400,7 @@ isMSBuildOnNETCoreSupported()
if [ "$__HostOS" == "Linux" ]; then
__isMSBuildOnNETCoreSupported=1
# note: the RIDs below can use globbing patterns
- UNSUPPORTED_RIDS=("debian.9-x64" "ubuntu.17.04-x64" "alpine.3.6.*-x64")
+ UNSUPPORTED_RIDS=("debian.9-x64" "ubuntu.17.04-x64")
for UNSUPPORTED_RID in "${UNSUPPORTED_RIDS[@]}"
do
if [[ $__HostDistroRid == $UNSUPPORTED_RID ]]; then
diff --git a/init-tools.sh b/init-tools.sh
index 4ec011d48d..1dff622116 100755
--- a/init-tools.sh
+++ b/init-tools.sh
@@ -38,7 +38,15 @@ if [ -z "$__DOTNET_PKG" ]; then
__DOTNET_PKG=dotnet-dev-linux-x64
OS=Linux
- if [ -e /etc/redhat-release ]; then
+ if [ -e /etc/os-release ]; then
+ source /etc/os-release
+ if [[ $ID == "alpine" ]]; then
+ # remove the last version digit
+ VERSION_ID=${VERSION_ID%.*}
+ __DOTNET_PKG=dotnet-dev-alpine.$VERSION_ID-x64
+ fi
+
+ elif [ -e /etc/redhat-release ]; then
redhatRelease=$(</etc/redhat-release)
if [[ $redhatRelease == "CentOS release 6."* || $redhatRelease == "Red Hat Enterprise Linux Server release 6."* ]]; then
__DOTNET_PKG=dotnet-dev-rhel.6-x64
diff --git a/src/.nuget/dir.props b/src/.nuget/dir.props
index 33adec27d7..3f0936a662 100644
--- a/src/.nuget/dir.props
+++ b/src/.nuget/dir.props
@@ -133,6 +133,7 @@
<ItemGroup Condition="$(SupportedPackageOSGroups.Contains(';Linux;'))">
<OfficialBuildRID Include="linux-x64" />
<OfficialBuildRID Include="rhel.6-x64" />
+ <OfficialBuildRID Include="alpine.3.6-x64" />
<OfficialBuildRID Include="linux-arm">
<Platform>arm</Platform>
</OfficialBuildRID>