From: Thefrank <1910378+Thefrank@users.noreply.github.com> Date: Thu, 24 Jun 2021 04:23:40 +0000 (-0700) Subject: Updates scripts for LLVM/Clang versions that are double digits (#2386) X-Git-Tag: submit/tizen/20220302.040122~25^2^2~49 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=250740a410ceaad766a4cb4eae8a5fa1c05c8289;p=platform%2Fcore%2Fdotnet%2Fdiagnostics.git Updates scripts for LLVM/Clang versions that are double digits (#2386) Co-authored-by: TheFrank --- diff --git a/eng/build.sh b/eng/build.sh index d6df50ab3..650d3e6d1 100755 --- a/eng/build.sh +++ b/eng/build.sh @@ -100,7 +100,7 @@ case $CPUName in __HostArch=x86 ;; - x86_64) + x86_64|amd64) __BuildArch=x64 __HostArch=x64 ;; @@ -259,7 +259,7 @@ while :; do -clang*) __Compiler=clang # clangx.y or clang-x.y - version="$(echo "$lowerI" | tr -d '[:alpha:]-=')" + version="$(echo "$1" | tr -d '[:alpha:]-=')" parts=(${version//./ }) __ClangMajorVersion="${parts[0]}" __ClangMinorVersion="${parts[1]}" diff --git a/eng/common/native/find-native-compiler.sh b/eng/common/native/find-native-compiler.sh index aed19d07d..289af7eed 100644 --- a/eng/common/native/find-native-compiler.sh +++ b/eng/common/native/find-native-compiler.sh @@ -45,6 +45,10 @@ check_version_exists() { desired_version="$1$2" elif command -v "$compiler-$1$2" > /dev/null; then desired_version="-$1$2" + elif command -v "$compiler$1" > /dev/null; then + desired_version="$1" + elif command -v "$compiler-$1" > /dev/null; then + desired_version="-$1" fi echo "$desired_version" @@ -55,7 +59,7 @@ if [ -z "$CLR_CC" ]; then # Set default versions if [ -z "$majorVersion" ]; then # note: gcc (all versions) and clang versions higher than 6 do not have minor version in file name, if it is zero. - if [ "$compiler" = "clang" ]; then versions=( 9 8 7 6.0 5.0 4.0 3.9 3.8 3.7 3.6 3.5 ) + if [ "$compiler" = "clang" ]; then versions=( 12 11 10 9 8 7 6.0 5.0 4.0 3.9 3.8 3.7 3.6 3.5 ) elif [ "$compiler" = "gcc" ]; then versions=( 9 8 7 6 5 4.9 ); fi for version in "${versions[@]}"; do diff --git a/eng/gen-buildsys-clang.sh b/eng/gen-buildsys-clang.sh index 2f8dd790e..a805d1e80 100755 --- a/eng/gen-buildsys-clang.sh +++ b/eng/gen-buildsys-clang.sh @@ -29,6 +29,12 @@ elif command -v "clang$2$3" > /dev/null elif command -v "clang-$2$3" > /dev/null then desired_llvm_version="-$2$3" +elif command -v "clang-$2" > /dev/null + then + desired_llvm_version="-$2" +elif command -v "clang$2" > /dev/null + then + desired_llvm_version="$2" elif command -v clang > /dev/null then desired_llvm_version=