-
-
Notifications
You must be signed in to change notification settings - Fork 594
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
fix Issue 14828 - duplicate symbol __ModuleInfoZ #4858
Conversation
d726d77
to
1517c75
Compare
- always emit __arrayZ/__assertZ/__unittest_failZ helpers (even in release) to avoid linkage issues when instantiating a template of that module with different compiler flags - also fixes Issue 14748 - Removing std.stdio import causes 2x increase in "Hello, world" same underlying issue, some undefined helper function drag in a different module which happens to have weak definitions of those helpers
LGTM When making PR's that fix a bugzilla issue, please include a link to the issue, such as https://issues.dlang.org/show_bug.cgi?id=14828 |
I usually do, it was a little late yesterday. |
fix Issue 14828 - duplicate symbol __ModuleInfoZ
If it is actually ok to require deimos-like modules to be compiled, too, maybe we can resurrect #3958 to get proper TypeInfo for structs. A lot of work has been done to avoid compilation of these files (by trying to guess what TypeInfo the backend will require, not completely successful so far), switching to a simpler compilation model would avoid all these complications. |
This is not what we decided. You'll almost never need an __arrayZ or __assertZ helper in deimos (b/c there are no D arrays in C, and rarely asserts in headers), and you could still workaround needing them. Compiling headers with zero initialized structs is quite a bummer. Let's discuss #3958 together with overhauling the template instantiation implementation (see #4784, and #4780 (comment)). |
to avoid linkage issues when instantiating a template of that module
with different compiler flags
same underlying issue, some undefined helper function drag in a different
module which happens to have weak definitions of those helpers
Issue 14828 – [REG2.067] duplicate symbol __ModuleInfoZ depending on ordering of files passed to dmd