Skip to content

Commit d994707

Browse files
tristan957hackorum
authored andcommitted
Use the found LLVM version when finding clang
find_program(version:) can be used to restrict the version of the program to be found. In this case, we need a clang that is compatible with LLVM. Prior to 4d8de28, this worked as intended, but since that change it was possible to pick an incompatible clang and LLVM combination. Reported-by: Andres Freund <andres@anarazel.de>
1 parent 31878cc commit d994707

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎meson.build‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -936,7 +936,7 @@ if have_cxx
936936

937937
# Some distros put LLVM and clang in different paths, so fallback to
938938
# find via PATH, too.
939-
clang = find_program(llvm_binpath / 'clang', 'clang', required: true)
939+
clang = find_program(llvm_binpath / 'clang', 'clang', version: llvm.version(), required: true)
940940
endif
941941
else
942942
msg = 'llvm requires a C++ compiler'

0 commit comments

Comments
 (0)