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
dwarfeh: version (Posix) replaced by "not Windows" #16143
base: master
Are you sure you want to change the base?
Conversation
Thanks for your pull request and interest in making D better, @denizzzka! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "master + dmd#16143" |
@@ -13,7 +13,7 @@ module rt.dwarfeh; | |||
|
|||
// debug = EH_personality; | |||
|
|||
version (Posix): |
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.
Did you not consider Cygwin?
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.
What do you mean? Cygwin builds will be broken?
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.
Even Mingw is a dwarf eh platform/environment. OK, dmd has no intention of supporting either, but doesn't ldc also use this module?
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.
The point I'm raising is that it is not without good reason that version(!Windows)
is not supported by the language. It is very bad practice to work around it by using version(Windows){} else:
instead.
That said, this module isn't used by gdc, so I'll defer it to an ldc developer to check this.
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.
The point I'm raising is that it is not without good reason that version(!Windows) is not supported by the language. It is very bad practice to work around it by using version(Windows){} else: instead.
Can we define enum/version like enableDwarfEH
and then set if for needed targets?
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.
The point I'm raising is that it is not without good reason that version(!Windows) is not supported by the language. It is very bad practice to work around it by using version(Windows){} else: instead.
What do you think about ~same #16141 ?
I'm kind-of sympathetic to being more bold wrt. making some existing
Good point; so here we could disable the module for
Yep, that's what I think would make the most sense wrt. making druntime more modularized/strippable - defining a rather coarse feature set via |
The way gdc supports mingw is Debug symbols and EH table format is not wedded to any specific platform. It's an implementation detail of the compiler runtime support - a separate core to the language runtime support. |
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.
The proper way to do this is:
version (Posix) { version = DWARFEH; }
else version (AnotherOS) { version = DWARFEH; }
else version (YetAnotherOS) { version = DWARFEH; }
else static assert(0);
version (DWARFEH):
This way, there is no default OS. One still has to proactively decide what code goes with what operating system, but the above makes it reasonable.
1666b58
to
fcfd1cd
Compare
Another little thing important to support non-Windows non-Posix targets: such targets also need EH support