Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fmt] Do not support Clang 20 + cppstd=20 due string literal evaluation #26177

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion recipes/fmt/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout
from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir
from conan.tools.layout import basic_layout
from conan.tools.build import check_min_cppstd
from conan.tools.build import check_min_cppstd, valid_max_cppstd
from conan.tools.scm import Version
from conan.tools.microsoft import is_msvc
from conan.errors import ConanInvalidConfiguration

required_conan_version = ">=1.53.0"

Expand Down Expand Up @@ -81,6 +82,14 @@ def package_id(self):
def validate(self):
if self.settings.get_safe("compiler.cppstd"):
check_min_cppstd(self, 11)
if Version(self.version).major in (8, 10, 11) and \
self.settings.compiler == "clang" and Version(self.settings.compiler.version) >= "20" and \
not valid_max_cppstd(self, 20):
# INFO: https://github.com/fmtlib/fmt/issues/4177
# Partially fixed by: https://github.com/fmtlib/fmt/commit/cacc3108c5b74020dba7bf3c6d3a7e58cdc085b2
# Completely fixed by: https://github.com/fmtlib/fmt/pull/4187
# TODO: Revisit after be released a new version of fmt
raise ConanInvalidConfiguration(f"This version of FMT does not currently support Clang 20 with C++20; please use -s compiler.cppstd=17. See https://github.com/fmtlib/fmt/issues/4177")

def source(self):
get(self, **self.conan_data["sources"][self.version], strip_root=True)
Expand Down