-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Bad function pointer using fmt in a side-module. #22587
Comments
It seems that combining both LTO, DCE (with I've also been trying to replace my usage of |
@jdumas {fmt} has logic to autodetect string-like types so if your custom string view has compatible API it will be automatically formattable. |
@vitaut is there a way to hijack that? At least for local testing to see if I can circumvent the runtime error by having fmt convert it to a full std::string, or use the |
@jdumas you can opt out of this detection via this internal trait: https://github.com/fmtlib/fmt/blob/6d43c755bc225b57f0fb55fef53408e7964644c6/include/fmt/base.h#L423C8-L423C26 |
Does enabling How about using |
@vitaut Hmm this doesn't seem to work. Am I forgetting something? @sbc100 I enabled Using |
|
I see. Yes the stack trace looks like this after I enable
|
Version of emscripten/emsdk:
I'm on macOS 14.5.
Failing command line in full:
Consider the following project:
CMakeLists.txt
main_module.cpp
side_module.cpp
Steps to reproduce:
Compile with the following:
Failing output:
The text was updated successfully, but these errors were encountered: