summaryrefslogtreecommitdiff
path: root/src/pal/tools
diff options
context:
space:
mode:
authorJan Vorlicek <janvorli@microsoft.com>2018-10-16 16:42:07 -0700
committerGitHub <noreply@github.com>2018-10-16 16:42:07 -0700
commit5c2c5961a6142fc0bf0c9f992ff76b4a32ad65e4 (patch)
tree52676844f336fc89dbeb77c4c5cf5a64ad020d82 /src/pal/tools
parent116461030e106f14d7fc53a2143930db21d6eaa6 (diff)
downloadcoreclr-5c2c5961a6142fc0bf0c9f992ff76b4a32ad65e4.tar.gz
coreclr-5c2c5961a6142fc0bf0c9f992ff76b4a32ad65e4.tar.bz2
coreclr-5c2c5961a6142fc0bf0c9f992ff76b4a32ad65e4.zip
Enable building with Clang 7 (#20417)
The Clang 7 is the first version in which only the major version is used in file names and paths. So the change needed to massage the build files a bit more than what was needed for the previous versions.
Diffstat (limited to 'src/pal/tools')
-rwxr-xr-xsrc/pal/tools/gen-buildsys-clang.sh28
1 files changed, 9 insertions, 19 deletions
diff --git a/src/pal/tools/gen-buildsys-clang.sh b/src/pal/tools/gen-buildsys-clang.sh
index 32a217f301..a644653350 100755
--- a/src/pal/tools/gen-buildsys-clang.sh
+++ b/src/pal/tools/gen-buildsys-clang.sh
@@ -20,21 +20,24 @@ fi
# Set up the environment to be used for building with clang.
if command -v "clang-$2.$3" > /dev/null
then
- export CC="$(command -v clang-$2.$3)"
- export CXX="$(command -v clang++-$2.$3)"
+ desired_llvm_version="-$2.$3"
elif command -v "clang$2$3" > /dev/null
then
- export CC="$(command -v clang$2$3)"
- export CXX="$(command -v clang++$2$3)"
+ desired_llvm_version="$2$3"
+elif command -v "clang-$2$3" > /dev/null
+ then
+ desired_llvm_version="-$2$3"
elif command -v clang > /dev/null
then
- export CC="$(command -v clang)"
- export CXX="$(command -v clang++)"
+ desired_llvm_version=
else
echo "Unable to find Clang Compiler"
exit 1
fi
+export CC="$(command -v clang$desired_llvm_version)"
+export CXX="$(command -v clang++$desired_llvm_version)"
+
build_arch="$4"
buildtype=DEBUG
code_coverage=OFF
@@ -79,19 +82,6 @@ else
exit 1
fi
-desired_llvm_major_version=$2
-desired_llvm_minor_version=$3
-if [ $OS = "FreeBSD" ]; then
- desired_llvm_version="$desired_llvm_major_version$desired_llvm_minor_version"
-elif [ $OS = "OpenBSD" ]; then
- desired_llvm_version=""
-elif [ $OS = "NetBSD" ]; then
- desired_llvm_version=""
-elif [ $OS = "SunOS" ]; then
- desired_llvm_version=""
-else
- desired_llvm_version="-$desired_llvm_major_version.$desired_llvm_minor_version"
-fi
locate_llvm_exec() {
if command -v "$llvm_prefix$1$desired_llvm_version" > /dev/null 2>&1
then