about summary refs log tree commit diff homepage
path: root/scripts/build/v-clang.inc
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/build/v-clang.inc')
-rw-r--r--scripts/build/v-clang.inc15
1 files changed, 14 insertions, 1 deletions
diff --git a/scripts/build/v-clang.inc b/scripts/build/v-clang.inc
index 29dce9cb..c6a2cf58 100644
--- a/scripts/build/v-clang.inc
+++ b/scripts/build/v-clang.inc
@@ -5,7 +5,20 @@ required_variables_clang=(
 artifact_dependency_clang=("")
 
 setup_variables_clang() {
-  LLVM_VERSION_SHORT="${LLVM_VERSION/./}"
+  local v_a
+  v_a=(${LLVM_VERSION//./ })
+
+  LLVM_VERSION_MAJOR="0"
+  LLVM_VERSION_MINOR="0"
+
+  if [[ "${#v_a[@]}" -ge 1 ]]; then
+    LLVM_VERSION_MAJOR="${v_a[0]}"
+  fi
+  if [[ "${#v_a[@]}" -ge 2 ]]; then
+    LLVM_VERSION_MINOR="${v_a[1]}"
+  fi
+
+  LLVM_VERSION_SHORT="${LLVM_VERSION_MAJOR}${LLVM_VERSION_MINOR}"
 }
 
 export_variables_clang=(