summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--meson.build8
1 files changed, 4 insertions, 4 deletions
diff --git a/meson.build b/meson.build
index 572a60ad064..04ea3488522 100644
--- a/meson.build
+++ b/meson.build
@@ -746,8 +746,8 @@ endif
###############################################################
llvmopt = get_option('llvm')
-if not llvmopt.disabled()
- add_languages('cpp', required: true, native: false)
+llvm = not_found_dep
+if add_languages('cpp', required: llvmopt, native: false)
llvm = dependency('llvm', version: '>=3.9', method: 'config-tool', required: llvmopt)
if llvm.found()
@@ -761,8 +761,8 @@ if not llvmopt.disabled()
ccache = find_program('ccache', native: true, required: false)
clang = find_program(llvm_binpath / 'clang', required: true)
endif
-else
- llvm = not_found_dep
+elif llvmopt.auto()
+ message('llvm requires a C++ compiler')
endif