Fix CLANGSYSINCLUDE check to match newer clang versions

In older versions of clang, the path used was using full version, for
example 12.0.1, but now we only use major version, which is 18.

This change is generic and should be working for both cases.

Discussion can be found in the patch to update linux_clang_dbgutil_64 to
clang 18.1.8:
https://gerrit.libreoffice.org/c/lode/+/182317/comments/57f1490c_72bbd109

Change-Id: I67614b9ed88ff73c0a15b13b350c9cb4a79906b0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193256
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
This commit is contained in:
Hossein
2025-11-03 18:44:57 +01:00
parent b476a78f40
commit e46c6e6695
+1 -1
View File
@@ -9019,7 +9019,7 @@ if test "$COM_IS_CLANG" = "TRUE"; then
if test -z "$CLANGSYSINCLUDE"; then
if test -n "$LLVM_CONFIG"; then
# Path to the clang system headers (no idea if there's a better way to get it).
CLANGSYSINCLUDE=$($LLVM_CONFIG --libdir)/clang/$($LLVM_CONFIG --version | sed 's/git\|svn//')/include
CLANGSYSINCLUDE=$(ls -d $($LLVM_CONFIG --libdir)/clang/*/include)
fi
fi
fi