Skip to content

Commit

Permalink
Update docker images for arm32 (dotnet#17422)
Browse files Browse the repository at this point in the history
* mark places that we need to change

* update dockumentation for arm

* update build.sh for arm

* update dockers' versions

* fix build.sh

* change default version for arm/armem/arm64
  • Loading branch information
Sergey Andreenko authored Apr 6, 2018
1 parent 73e10d2 commit a96d2fe
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 9 deletions.
2 changes: 2 additions & 0 deletions Documentation/building/linux-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ In order to get clang-3.9, llvm-3.9 and lldb-3.9 on Ubuntu 14.04, we need to add
~$ echo "deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.9 main" | sudo tee /etc/apt/sources.list.d/llvm.list
~$ wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key | sudo apt-key add -
~$ sudo apt-get update

Note: arm clang has a known issue with CompareExchange (#15074), so for arm you have to use clang-4.0 or higher, the official build uses clang-5.0.

For other version of Debian/Ubuntu, please visit http://apt.llvm.org/.

Expand Down
15 changes: 10 additions & 5 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,10 @@ check_prereqs()
hash cmake 2>/dev/null || { echo >&2 "Please install cmake before running this script"; exit 1; }


# Minimum required version of clang is version 3.9 for arm/armel cross build
# Minimum required version of clang is version 4.0 for arm/armel cross build
if [[ $__CrossBuild == 1 && ("$__BuildArch" == "arm" || "$__BuildArch" == "armel") ]]; then
if ! [[ "$__ClangMajorVersion" -gt "3" || ( $__ClangMajorVersion == 3 && $__ClangMinorVersion == 9 ) ]]; then
echo "Please install clang3.9 or latest for arm/armel cross build"; exit 1;
if ! [[ "$__ClangMajorVersion" -ge "4" ]]; then
echo "Please install clang4.0 or latest for arm/armel cross build"; exit 1;
fi
fi

Expand Down Expand Up @@ -894,8 +894,13 @@ fi

# Set default clang version
if [[ $__ClangMajorVersion == 0 && $__ClangMinorVersion == 0 ]]; then
__ClangMajorVersion=3
__ClangMinorVersion=9
if [[ "$__BuildArch" == "arm" || "$__BuildArch" == "armel" ]]; then
__ClangMajorVersion=5
__ClangMinorVersion=0
else
__ClangMajorVersion=3
__ClangMinorVersion=9
fi
fi

if [[ "$__BuildArch" == "armel" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion buildpipeline/pipelines.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
{
"Name": "DotNet-CoreClr-Trusted-Linux-Crossbuild",
"Parameters": {
"DockerTag": "ubuntu-14.04-cross-e435274-20180323032140",
"DockerTag": "ubuntu-14.04-cross-e435274-20180405193556",
"Architecture": "arm",
"Rid": "linux",
"CrossArchitecture": "x86",
Expand Down
6 changes: 3 additions & 3 deletions netci.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -968,18 +968,18 @@ def static getDockerImageName(def architecture, def os, def isBuild) {
}
else if (architecture == 'armem') {
if (os == 'Ubuntu') {
return "microsoft/dotnet-buildtools-prereqs:ubuntu-14.04-cross-0cd4667-20172211042239"
return "microsoft/dotnet-buildtools-prereqs:ubuntu-14.04-cross-e435274-20180405193556"
}
else if (os == 'Ubuntu16.04') {
return "microsoft/dotnet-buildtools-prereqs:ubuntu-16.04-cross-ef0ac75-20175511035548"
return "microsoft/dotnet-buildtools-prereqs:ubuntu-16.04-cross-e435274-20180404203310"
}
else if (os == 'Tizen') {
return "hqueue/dotnetcore:ubuntu1404_cross_prereqs_v4-tizen_rootfs"
}
}
else if (architecture == 'arm') {
if (os == 'Ubuntu') {
return "microsoft/dotnet-buildtools-prereqs:ubuntu-14.04-cross-e435274-20180323032140"
return "microsoft/dotnet-buildtools-prereqs:ubuntu-14.04-cross-e435274-20180405193556"
}
}
}
Expand Down

0 comments on commit a96d2fe

Please sign in to comment.