Skip to content

Commit 4d8de28

Browse files
committed
Fallback to clang in PATH with meson
Some distributions put clang into a different path than the llvm binary path. For example, this is the case on NixOS / nixpkgs, which failed to find clang with meson before this patch. Author: Wolfgang Walther Reviewed-by: Nazir Bilal Yavuz, Alvaro Herrera, Peter Eisentraut Reviewed-by: Tristan Partin Discussion: https://www.postgresql.org/message-id/ca8f37e1-a2c3-40e2-91f6-59c3d3652ad4@technowledgy.de Backpatch: 16-, where meson support was added
1 parent a00fae9 commit 4d8de28

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

meson.build

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -799,7 +799,10 @@ if add_languages('cpp', required: llvmopt, native: false)
799799
llvm_binpath = llvm.get_variable(configtool: 'bindir')
800800

801801
ccache = find_program('ccache', native: true, required: false)
802-
clang = find_program(llvm_binpath / 'clang', required: true)
802+
803+
# Some distros put LLVM and clang in different paths, so fallback to
804+
# find via PATH, too.
805+
clang = find_program(llvm_binpath / 'clang', 'clang', required: true)
803806
endif
804807
elif llvmopt.auto()
805808
message('llvm requires a C++ compiler')

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