Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Jan 2026 17:40:58 +0000
From:      Dimitry Andric <dim@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org
Subject:   git: 5d4b111e3843 - 2026Q1 - devel/llvm16: fix build with clang 21
Message-ID:  <6967d52a.35b22.5bb9be49@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch 2026Q1 has been updated by dim:

URL: https://cgit.FreeBSD.org/ports/commit/?id=5d4b111e3843fd42fe72c3c3a6d78cfe20537a05

commit 5d4b111e3843fd42fe72c3c3a6d78cfe20537a05
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2026-01-01 17:53:39 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2026-01-14 17:40:32 +0000

    devel/llvm16: fix build with clang 21
    
    Recent versions of clang complain about explicit copy constructors,
    leading to errors similar to:
    
        /wrkdirs/usr/ports/devel/llvm16/work-default/llvm-project-16.0.6.src/llvm/tools/sancov/sancov.cpp:521:42: error: chosen constructor is explicit in copy-initialization
          521 |     return SpecialCaseList::createOrDie({{ClIgnorelist}},
              |                                          ^~~~~~~~~~~~~~
        /usr/include/c++/v1/string:1153:64: note: explicit constructor declared here
         1153 |   _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit basic_string(const _Tp& __t) {
              |                                                                ^
        /usr/include/c++/v1/__vector/vector.h:276:91: note: passing argument to parameter '__il' here
          276 |   _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI vector(initializer_list<value_type> __il) {
              |                                                                                           ^
    
    In this case, `ClIgnorelist` is an instance of `cl::opt`, not a
    `std::string` as expected. Use `getValue()` to get the actual
    `std::string` value.
    
    PR:             292112
    Approved by:    brooks (maintainer)
    MFH:            2026Q1
    
    (cherry picked from commit 347be1ab29c26d0414a6c51b6d69f359718b58d6)
---
 devel/llvm16/files/patch-llvm_tools_sancov_sancov.cpp | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/devel/llvm16/files/patch-llvm_tools_sancov_sancov.cpp b/devel/llvm16/files/patch-llvm_tools_sancov_sancov.cpp
new file mode 100644
index 000000000000..d94ab7e5a481
--- /dev/null
+++ b/devel/llvm16/files/patch-llvm_tools_sancov_sancov.cpp
@@ -0,0 +1,11 @@
+--- llvm/tools/sancov/sancov.cpp.orig	2023-06-10 22:58:16 UTC
++++ llvm/tools/sancov/sancov.cpp
+@@ -518,7 +518,7 @@ class Ignorelists { (private)
+   static std::unique_ptr<SpecialCaseList> createUserIgnorelist() {
+     if (ClIgnorelist.empty())
+       return std::unique_ptr<SpecialCaseList>();
+-    return SpecialCaseList::createOrDie({{ClIgnorelist}},
++    return SpecialCaseList::createOrDie({{ClIgnorelist.getValue()}},
+                                         *vfs::getRealFileSystem());
+   }
+   std::unique_ptr<SpecialCaseList> DefaultIgnorelist;


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6967d52a.35b22.5bb9be49>