Skip to content

Commit 7a7f13a

Browse files
committed
meson: 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. 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 <tristan@neon.tech> Reviewed-by: Andres Freund <andres@anarazel.de> Discussion: https://postgr.es/m/CSPIJVUDZFKX.3KHMOAVGF94RV@c3po Backpatch: 16-, where meson support was added
1 parent 47caa71 commit 7a7f13a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

meson.build

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -746,8 +746,8 @@ endif
746746
###############################################################
747747

748748
llvmopt = get_option('llvm')
749-
if not llvmopt.disabled()
750-
add_languages('cpp', required: true, native: false)
749+
llvm = not_found_dep
750+
if add_languages('cpp', required: llvmopt, native: false)
751751
llvm = dependency('llvm', version: '>=3.9', method: 'config-tool', required: llvmopt)
752752

753753
if llvm.found()
@@ -761,8 +761,8 @@ if not llvmopt.disabled()
761761
ccache = find_program('ccache', native: true, required: false)
762762
clang = find_program(llvm_binpath / 'clang', required: true)
763763
endif
764-
else
765-
llvm = not_found_dep
764+
elif llvmopt.auto()
765+
message('llvm requires a C++ compiler')
766766
endif
767767

768768

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy