Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package ccls for openSUSE:Factory checked in at 2023-03-31 21:15:36
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ccls (Old)
and /work/SRC/openSUSE:Factory/.ccls.new.31432 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ccls"
Fri Mar 31 21:15:36 2023 rev:17 rq:1075714 version:0.20220729
Changes:
--------
--- /work/SRC/openSUSE:Factory/ccls/ccls.changes 2022-08-01 21:33:16.578151761 +0200
+++ /work/SRC/openSUSE:Factory/.ccls.new.31432/ccls.changes 2023-03-31 21:15:37.854414655 +0200
@@ -1,0 +2,9 @@
+Thu Mar 30 21:52:42 UTC 2023 - Aaron Puchert
+
+- Backport upstream patch llvm16-optional-deprecation.patch to fix
+ build with LLVM 16.
+- Relax runtime requirements with Clang 16 and newer: the resource
+ directory doesn't depend on the patch-level version anymore.
+- Relax build requirements.
+
+-------------------------------------------------------------------
New:
----
llvm16-optional-deprecation.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ccls.spec ++++++
--- /var/tmp/diff_new_pack.XvbjsW/_old 2023-03-31 21:15:38.502417667 +0200
+++ /var/tmp/diff_new_pack.XvbjsW/_new 2023-03-31 21:15:38.510417704 +0200
@@ -1,7 +1,7 @@
#
# spec file for package ccls
#
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -26,6 +26,7 @@
Group: Development/Tools/IDE
URL: https://github.com/MaskRay/ccls
Source0: %{URL}/archive/%{version}/%{name}-%{version}.tar.gz
+Patch0: %{URL}/commit/6dc564f2a8608fff778a7d7e8ed0d5acd8d61e6b.patch#/llvm16-optional-deprecation.patch
BuildRequires: clang-devel >= 7.0
BuildRequires: cmake >= 3.8
BuildRequires: llvm-devel >= 7.0
@@ -37,7 +38,14 @@
Provides: bundled(siphash)
# ccls hardcodes the paths to clang's resource dir and we thus must ensure that
# it is always shipped with the same clang version that was used to build it
-%{requires_eq clang}
+%if %{pkg_vcmp clang-devel >= 16.0.0}
+# With Clang 16, the resource directory depends on the major version only and
+# doesn't change with patch-level updates.
+Requires: libclang-cpp%{_llvm_sonum}
+%else
+# Previously the full version was used, so we need to require that same version.
+%{requires_eq libclang-cpp%{_llvm_sonum}}
+%endif
# gcc > 7.0 is called gcc7- in Leap 15.2 and 15.3
%if 0%{?sle_version} >= 150200
BuildRequires: gcc7-c++ >= 7.2
@@ -73,7 +81,6 @@
%else
-DCLANG_LINK_CLANG_DYLIB=OFF
%endif
-# ccls currently consumes ~1GB of memory during compilation per thread
%cmake_build
%install
++++++ _constraints ++++++
--- /var/tmp/diff_new_pack.XvbjsW/_old 2023-03-31 21:15:38.538417834 +0200
+++ /var/tmp/diff_new_pack.XvbjsW/_new 2023-03-31 21:15:38.546417871 +0200
@@ -2,7 +2,7 @@
<constraints>
<hardware>
<memoryperjob>
- <size unit="M">1000</size>
+ <size unit="M">700</size>
</memoryperjob>
</hardware>
</constraints>
++++++ llvm16-optional-deprecation.patch ++++++
From 6dc564f2a8608fff778a7d7e8ed0d5acd8d61e6b Mon Sep 17 00:00:00 2001
From: Fangrui Song
Date: Sat, 17 Dec 2022 20:04:54 -0800
Subject: [PATCH] Adapt llvm::Optional deprecation
---
src/indexer.cc | 4 +++-
src/project.cc | 11 +++++++----
src/sema_manager.cc | 4 +++-
3 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/src/indexer.cc b/src/indexer.cc
index d5fe7da2c..83b77a201 100644
--- a/src/indexer.cc
+++ b/src/indexer.cc
@@ -1097,7 +1097,9 @@ class IndexPPCallbacks : public PPCallbacks {
void InclusionDirective(SourceLocation hashLoc, const Token &tok,
StringRef included, bool isAngled,
CharSourceRange filenameRange,
-#if LLVM_VERSION_MAJOR >= 15 // llvmorg-15-init-7692-gd79ad2f1dbc2
+#if LLVM_VERSION_MAJOR >= 16 // llvmorg-16-init-15080-g854c10f8d185
+ OptionalFileEntryRef fileRef,
+#elif LLVM_VERSION_MAJOR >= 15 // llvmorg-15-init-7692-gd79ad2f1dbc2
llvm::Optional<FileEntryRef> fileRef,
#else
const FileEntry *file,
diff --git a/src/project.cc b/src/project.cc
index c02bd6b67..b1b7f557c 100644
--- a/src/project.cc
+++ b/src/project.cc
@@ -391,11 +391,14 @@ void Project::loadDirectory(const std::string &root, Project::Folder &folder) {
fwrite(input.c_str(), input.size(), 1, fout);
fclose(fout);
}
- std::array redir{StringRef(stdinPath),
- StringRef(path), StringRef()};
+#if LLVM_VERSION_MAJOR >= 16 // llvmorg-16-init-12589-ge748db0f7f09
+ std::array
+#else
+ std::array
+#endif
+ redir{StringRef(stdinPath), StringRef(path), StringRef()};
std::vector<StringRef> args{g_config->compilationDatabaseCommand, root};
- if (sys::ExecuteAndWait(args[0], args, llvm::None, redir, 0, 0, &err_msg) <
- 0) {
+ if (sys::ExecuteAndWait(args[0], args, {}, redir, 0, 0, &err_msg) < 0) {
LOG_S(ERROR) << "failed to execute " << args[0].str() << " "
<< args[1].str() << ": " << err_msg;
return;
diff --git a/src/sema_manager.cc b/src/sema_manager.cc
index a7b6f8cab..14f303b5f 100644
--- a/src/sema_manager.cc
+++ b/src/sema_manager.cc
@@ -179,7 +179,9 @@ class StoreInclude : public PPCallbacks {
void InclusionDirective(SourceLocation hashLoc, const Token &includeTok,
StringRef fileName, bool isAngled,
CharSourceRange filenameRange,
-#if LLVM_VERSION_MAJOR >= 15 // llvmorg-15-init-7692-gd79ad2f1dbc2
+#if LLVM_VERSION_MAJOR >= 16 // llvmorg-16-init-15080-g854c10f8d185
+ OptionalFileEntryRef fileRef,
+#elif LLVM_VERSION_MAJOR >= 15 // llvmorg-15-init-7692-gd79ad2f1dbc2
llvm::Optional<FileEntryRef> fileRef,
#else
const FileEntry *file,