Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Backports:SLE-15-SP6
rstudio
0006-Fix-libclang-usage.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0006-Fix-libclang-usage.patch of Package rstudio
From e93996837bceb3bdae376332be5aca964a2737ff Mon Sep 17 00:00:00 2001 From: Aaron Puchert <aaronpuchert@alice-dsl.net> Date: Mon, 7 Sep 2020 11:12:26 +0200 Subject: [PATCH 6/8] Fix libclang usage --- src/cpp/core/include/core/libclang/LibClang.hpp | 1 + src/cpp/core/libclang/LibClang.cpp | 17 +++++++---------- 2 files changed, 8 insertions(+), 10 deletions(-) --- a/src/cpp/core/include/core/libclang/LibClang.hpp +++ b/src/cpp/core/include/core/libclang/LibClang.hpp @@ -36,6 +36,7 @@ #include "clang-c/Index.h" #include "clang-c/CXCompilationDatabase.h" +#include "clang-c/Documentation.h" namespace rstudio { namespace core { --- a/src/cpp/core/libclang/LibClang.cpp +++ b/src/cpp/core/libclang/LibClang.cpp @@ -62,12 +62,12 @@ std::vector<std::string> defaultCompileArgs(LibraryVersion version) // we need to add in the associated libclang headers as // they are not discovered / used by default during compilation - FilePath llvmPath = s_libraryPath.getParent().getParent(); - boost::format fmt("%1%/lib/clang/%2%/include"); - fmt % llvmPath.getAbsolutePath() % version.asString(); + FilePath llvmPath = s_libraryPath.getParent(); + boost::format fmt("%1%/clang/%2%/include"); + const std::string& versionStr = version.asString(); + fmt % llvmPath.getAbsolutePath() % versionStr.substr(0, versionStr.find('.')); std::string includePath = fmt.str(); - if (FilePath(includePath).exists()) - compileArgs.push_back(std::string("-I") + includePath); + compileArgs.push_back(std::string("-I") + includePath); return compileArgs; } @@ -89,12 +89,9 @@ std::vector<std::string> systemClangVersions() #elif defined(__unix__) // default set of versions clangVersions = { - "/usr/lib/libclang.so", - "/usr/lib/llvm/libclang.so", - "/usr/lib64/libclang.so", - "/usr/lib64/llvm/libclang.so", + "LIBCLANG_PLACEHOLDER", }; - +#elif 0 // iterate through the set of available 'llvm' directories for (const char* prefix : {"/usr/lib", "/usr/lib64"}) {
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor