blob: f83112dbed51c3ead41df7e1c9f397f85075a698 (
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
install_build_dependencies_llvm() {
apt update -y
dependencies=(
build-essential
autoconf
automake
groff
gcc
g++
python-dev
make
subversion # Check out code
zlib1g-dev
)
#Install essential dependencies
apt -y --no-install-recommends install "${dependencies[@]}"
}
install_binary_artifact_llvm() {
apt update -y
dependencies=(
"clang-${LLVM_VERSION}"
)
#Install essential dependencies
apt -y --no-install-recommends install "${dependencies[@]}"
}
# Check if the binary artifact is installed
is_installed_llvm() {
local lc=""
# Check if llvm-config with the right version exists
lc=$(which "llvm-config-${LLVM_VERSION}")
local rtti
rtti="$(${lc} --has-rtti)"
local assertion
assertion="$(${lc} --assertion-mode)"
local build_mode
build_mode="$(${lc} --build-mode)"
# Check requested mode with mode of the found item
[[ $(to_bool "${REQUIRES_RTTI}") -eq $(to_bool "${rtti}") ]] || return 1
[[ $(to_bool "${DISABLE_ASSERTIONS}") -ne $(to_bool "${assertion}") ]] || return 1
}
|