-
-
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 24129 - ImportC: MS-Link cannot handle multiple COMDATs wit… #15585
Conversation
Thanks for your pull request, @WalterBright! Bugzilla references
|
080f4a1
to
ca172d6
Compare
fd._linkage == LINK.c && | ||
!fd.skipCodegen) // code gen is desired | ||
{ | ||
__gshared DsymbolTable Csymtab; // sorry about another global variable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it have to be declared inline? The rest of the compiler has a more (...) global pattern for the global variables.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@WalterBright can we make Csymtab
a member variable of the ToSymbol
visitor class? If not, why? Perhaps we can move it up the call stack and pass it as a parameter to the visitor constructor, in case there are multiple instances?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer to prove that this fix works. Refactoring it then can (and should) be an independent task.
Should we really be fixing linker issues in the compiler? |
The main reason DMD (and DMC++) had its own linker was it was easier than concocting endless workarounds for MS-Link bugs. We can't fix the linker! So what else can we do? |
Why is this not approved? |
There's this comment from @PetarKirov which remains unaddressed. |
@RazvanN7 it's addressed now. |
ca172d6
to
a60429f
Compare
…h the same name
Took me a while to figure out where to put this tweak. Although it is meant just for MS-LINK, I enabled it for all targets to flush out any bugs in it.