aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2017-10-05 11:19:07 +0100
committerEmil Velikov <[email protected]>2017-10-13 12:56:13 +0100
commit36d6d1e931936a80da327889862ba02942ac427b (patch)
tree27dc8d26175849e5e1750b05e7c43fa9f23b7b6d /configure.ac
parenta7ecf7b86f4eae59f3ceac2125e5d1725c403c07 (diff)
configure.ac: add llvm_add_optional_component helper
We want to add "optional" components, which have been added with later LLVM versions. One such in-tree example is inteljitevents. Others are to follow shortly. v2: Use the correct function, add blank line between functions (Tobias) Cc: [email protected] Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Tobias Droste <[email protected]>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac13
1 files changed, 10 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 751f70a02ab..d22b522278c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -955,6 +955,15 @@ llvm_add_component() {
fi
}
+llvm_add_optional_component() {
+ new_llvm_component=$1
+ driver_name=$2
+
+ if $LLVM_CONFIG --components | grep -iqw $new_llvm_component ; then
+ LLVM_COMPONENTS="${LLVM_COMPONENTS} ${new_llvm_component}"
+ fi
+}
+
llvm_add_default_components() {
driver_name=$1
@@ -965,9 +974,7 @@ llvm_add_default_components() {
llvm_add_component "mcjit" $driver_name
# Optional default components
- if $LLVM_CONFIG --components | grep -iqw inteljitevents ; then
- LLVM_COMPONENTS="$LLVM_COMPONENTS inteljitevents"
- fi
+ llvm_add_optional_component "inteljitevents" $driver_name
}
llvm_add_target() {