summaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
authorJiyoung Yun <jy910.yun@samsung.com>2017-04-27 07:54:50 (GMT)
committerJiyoung Yun <jy910.yun@samsung.com>2017-04-27 07:54:50 (GMT)
commit5b975f8233e8c8d17b215372f89ca713b45d6a0b (patch)
tree0267bcc331458a01f4c26fafd28110a72273beb3 /build.sh
parenta56e30c8d33048216567753d9d3fefc2152af8ac (diff)
downloadcoreclr-5b975f8233e8c8d17b215372f89ca713b45d6a0b.zip
coreclr-5b975f8233e8c8d17b215372f89ca713b45d6a0b.tar.gz
coreclr-5b975f8233e8c8d17b215372f89ca713b45d6a0b.tar.bz2
Imported Upstream version 2.0.0.11599upstream/2.0.0.11599
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh24
1 files changed, 21 insertions, 3 deletions
diff --git a/build.sh b/build.sh
index ae5e436..018cdf0 100755
--- a/build.sh
+++ b/build.sh
@@ -118,6 +118,14 @@ check_prereqs()
# Check presence of CMake on the path
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
+ 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;
+ fi
+ fi
+
# Check for clang
hash clang-$__ClangMajorVersion.$__ClangMinorVersion 2>/dev/null || hash clang$__ClangMajorVersion$__ClangMinorVersion 2>/dev/null || hash clang 2>/dev/null || { echo >&2 "Please install clang-$__ClangMajorVersion.$__ClangMinorVersion before running this script"; exit 1; }
@@ -671,6 +679,11 @@ while :; do
__ClangMinorVersion=9
;;
+ clang4.0)
+ __ClangMajorVersion=4
+ __ClangMinorVersion=0
+ ;;
+
ninja)
__UseNinja=1
;;
@@ -732,7 +745,7 @@ while :; do
cmakeargs)
if [ -n "$2" ]; then
- __cmakeargs="$2"
+ __cmakeargs="$__cmakeargs $2"
shift
else
echo "ERROR: 'cmakeargs' requires a non-empty option argument"
@@ -780,8 +793,13 @@ fi
# Set default clang version
if [[ $__ClangMajorVersion == 0 && $__ClangMinorVersion == 0 ]]; then
if [ $__CrossBuild == 1 ]; then
- __ClangMajorVersion=3
- __ClangMinorVersion=6
+ if [[ "$__BuildArch" == "arm" || "$__BuildArch" == "armel" ]]; then
+ __ClangMajorVersion=3
+ __ClangMinorVersion=9
+ else
+ __ClangMajorVersion=3
+ __ClangMinorVersion=6
+ fi
else
__ClangMajorVersion=3
__ClangMinorVersion=5