v4-0007-Tie-adding-C-support-to-the-llvm-Meson-option.patch
text/x-patch
Filename: v4-0007-Tie-adding-C-support-to-the-llvm-Meson-option.patch
Type: text/x-patch
Part: 6
Message:
Re: Meson build updates
Patch
Format: format-patch
Series: patch v4-0007
Subject: Tie adding C++ support to the llvm Meson option
| File | + | − |
|---|---|---|
| meson.build | 2 | 4 |
From 4e4934ee125c06d639de43c8e1f46b63b93813b9 Mon Sep 17 00:00:00 2001
From: Tristan Partin <tristan@neon.tech>
Date: Tue, 16 May 2023 09:27:06 -0500
Subject: [PATCH v4 07/14] Tie adding C++ support to the llvm Meson option
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.
---
meson.build | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 121126a7da..52c4b9bba8 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,6 @@ 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
endif
--
Tristan Partin
Neon (https://neon.tech)