mirror of
https://github.com/postgres/postgres.git
synced 2025-05-29 16:21:20 +03:00
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
This commit is contained in:
parent
cc90d7823a
commit
23be520632
@ -805,7 +805,10 @@ if add_languages('cpp', required: llvmopt, native: false)
|
|||||||
llvm_binpath = llvm.get_variable(configtool: 'bindir')
|
llvm_binpath = llvm.get_variable(configtool: 'bindir')
|
||||||
|
|
||||||
ccache = find_program('ccache', native: true, required: false)
|
ccache = find_program('ccache', native: true, required: false)
|
||||||
clang = find_program(llvm_binpath / 'clang', required: true)
|
|
||||||
|
# Some distros put LLVM and clang in different paths, so fallback to
|
||||||
|
# find via PATH, too.
|
||||||
|
clang = find_program(llvm_binpath / 'clang', 'clang', required: true)
|
||||||
endif
|
endif
|
||||||
elif llvmopt.auto()
|
elif llvmopt.auto()
|
||||||
message('llvm requires a C++ compiler')
|
message('llvm requires a C++ compiler')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user