diff options
| author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2024-06-03 10:42:31 +0200 |
|---|---|---|
| committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2024-06-03 13:39:34 +0200 |
| commit | e2b48350138ea8b9f61aaf6c44faa8b111d83079 (patch) | |
| tree | 8de9df9adead65d043ff45d45d9f5f1e8a8b8738 /sources/shiboken6/ApiExtractor/clangparser/compilersupport.cpp | |
| parent | 8602a8d781a0d4cf405356632fb578f3c9080ca7 (diff) | |
shiboken6/compilersupport: Fix finding the clang include directory on manylinux_2_28_x86_64
llvm-config --libdir reports /usr/lib64 on manylinux_2_28_x86_64
whereas the includes are under /usr/lib/clang/../include.
Fixes: PYSIDE-2769
Pick-to: 6.7
Change-Id: I217d6bf62bbd2e63258b91d64fb9c0fe5f1ff052
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
Diffstat (limited to 'sources/shiboken6/ApiExtractor/clangparser/compilersupport.cpp')
| -rw-r--r-- | sources/shiboken6/ApiExtractor/clangparser/compilersupport.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sources/shiboken6/ApiExtractor/clangparser/compilersupport.cpp b/sources/shiboken6/ApiExtractor/clangparser/compilersupport.cpp index 01c4b188d..20224020b 100644 --- a/sources/shiboken6/ApiExtractor/clangparser/compilersupport.cpp +++ b/sources/shiboken6/ApiExtractor/clangparser/compilersupport.cpp @@ -290,8 +290,17 @@ static QString findClangBuiltInIncludesDir() const QString clangPathLibDir = findClangLibDir(); if (!clangPathLibDir.isEmpty()) { QString candidate; + QString clangDirName = clangPathLibDir + u"/clang"_s; + // PYSIDE-2769: llvm-config --libdir may report /usr/lib64 on manylinux_2_28_x86_64 + // whereas the includes are under /usr/lib/clang/../include. + if (!QFileInfo::exists(clangDirName) && clangPathLibDir.endsWith("64"_L1)) { + const QString fallback = clangPathLibDir.sliced(0, clangPathLibDir.size() - 2); + clangDirName = fallback + u"/clang"_s; + qCWarning(lcShiboken, "%s: Falling back from %s to %s.", + __FUNCTION__, qPrintable(clangPathLibDir), qPrintable(fallback)); + } + QVersionNumber lastVersionNumber(1, 0, 0); - const QString clangDirName = clangPathLibDir + u"/clang"_s; QDir clangDir(clangDirName); const QFileInfoList versionDirs = clangDir.entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot); |
