-
-
Notifications
You must be signed in to change notification settings - Fork 229
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
Add betterC to probePlatform calls #2699
Conversation
✅ PR OK, no changes in deprecations or warnings Total deprecations: 14 Total warnings: 0 Build statistics: statistics (-before, +after)
-executable size=5357768 bin/dub
+executable size=5361864 bin/dub
rough build time=80s Full build output
|
I've added a workaround for a GDC bug related to this, the platform check would fail because __ctfe is broken and will try to compile for runtime anyways. The cursed multi-line pragma improves compatibility and has been tested across GDC, DMD and LDC. It also now fully does not depend on libphobos for output compilation which should speed it up too. |
When building D projects without a runtime for new platforms, dub will fail when there's no druntime for said platform.
This PR makes all the probePlatform calls use betterC so that runtime-less platforms can be built for with dub.
I need this for building D projects for the SuperH CPU architecture (as used in the SEGA Dreamcast and SEGA Saturn)
NOTE: This PR could be improved by checking the compiler versions before calling probePlatform, to ensure that older compilers without betterC support for the platform probe still works.