about summary refs log tree commit diff homepage
path: root/scripts/build/v-clang.inc
blob: 7d919a4d84feadff959cc92bf482c30c34865daa (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
required_variables_clang=(
  "LLVM_VERSION"
)

artifact_dependency_clang=("cmake")

setup_variables_clang() {
  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=(
  "LLVM_CONFIG"
  "BITCODE_CC"
  "BITCODE_CXX"
)