agora inbox for [email protected]
help / color / mirror / Atom feedFrom: Andres Freund <[email protected]>
Subject: [PATCH v16a 2/2] meson: Tie adding C++ support to the llvm Meson option
Date: Thu, 29 Jun 2023 09:42:09 -0700
In the event the llvm option is defined to be 'auto', it is possible
that the host machine might not have a C++ compiler. If that is the
case, then we shouldn't continue reaching for the llvm dependency.
To make it easier to understand the case where LLVM support is disabled due to
lacking a C++ compiler, add a message noting that fact.
Author: Tristan Partin <[email protected]>
Reviewed-by: Andres Freund <[email protected]>
Discussion: https://postgr.es/m/CSPIJVUDZFKX.3KHMOAVGF94RV@c3po
---
meson.build | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 6661c1fefa2..3ac5acb1732 100644
--- a/meson.build
+++ b/meson.build
@@ -742,8 +742,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()
@@ -757,8 +757,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
--
2.38.0
--owu2kol6rl73t573--
view thread (2+ messages)
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected]
Subject: Re: [PATCH v16a 2/2] meson: Tie adding C++ support to the llvm Meson option
In-Reply-To: <no-message-id-101065@localhost>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox