-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
C++20 modules build issues #4153
Comments
Thanks for the fixes! The warning about I haven't tried using modules with shared libraries. As usual PRs to make {fmt} more compatible with this configuration would be welcome. |
Closing for now as I don't see anything actionable from {fmt} but feel free to reopen if new information comes up. |
No worries. I'd have to experiment a bit and not sure how soon I can, but if I were to make the shared library changes with the second approach mentioned (essentially changing a lot of member functions from |
|
Right, I was wondering about this since in the module ABI sense also, it doesn't really seem to make sense to have a |
I've hit a number of issues trying to package
fmt
forbuild2
with modules support.fmt.cc
withimport std;
disabled will#include <expected>
without any of the guards used for including it insidefmt/std.h
, which raises a warning on MSVC. I haven't addressed this in the PR asFMT_HAS_INCLUDE
isn't available at that point in the source file, and I'm also unsure why the C++ version and above macro are used in some places but feature test macros in others.fmt
modules support is not being verified by the CI? I'm also a bit unclear on what the status is of the tests wrt modules. I can see there is amodule-test.cc
, but before that gets added in the cmake file this check will bail out.There appear to also be issues with the combination of modules and shared builds.
build2
should be doing, so it's not clear to me yet if anything will need to change on thefmt
side for this particular problem.inline
as they are in traditional TUs. As such there are lots of functions that have not been marked asFMT_API
(themselves or via their class) as they were implicitly inline; but now in the modules case they no longer are. There would appear to be two options: mark more classes/functions asFMT_API
, or mark the member functions as explicitly inline. I wonder if the former can potentially cause problems for a non-modules build, but I'm generally unsure of the trade-offs here.clang-libcpp-fedora-modules-link-errors.txt
The text was updated successfully, but these errors were encountered: