-
-
Notifications
You must be signed in to change notification settings - Fork 611
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
Make backend configuration platform-independent #12137
Conversation
This will allow us to move towards a cross compiler.
Removing static condition is one step forward towards cross compilation.
This makes the code a lot more DRY. The TARGET_OSX clauses were merged with the other POSIX target as support for 32 bits OSX has ended.
Another step towards real cross compilation.
Thanks for your pull request, @Geod24! 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#12137" |
_tyalignsize[TYldouble] = 2; | ||
_tyalignsize[TYildouble] = 2; | ||
_tyalignsize[TYcldouble] = 2; | ||
} |
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 check if dmc still uses this function? If so, it would be worth mentioning in the commit message.
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's no way to check this, so I wanted to get @WalterBright 's opinion.
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.
DMC is open sourced on the digitalmars github org IIRC, so it can be checked.
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.
Please:
- These sorts of changes make my life difficult as I have to redo them to ensure they work with the other backend's Digital Mars builds. For example, you removed the 16 bit support. Dead code to DMD may not be dead code for DMC. See https://github.com/DigitalMars/Compiler/tree/master/dm/src/dmc
- This PR is way too large. It can be done incrementally with much easier to see increments. I understand it is done with a series of commits, but those get squashed and lost. It is really not a problem to do a series of PRs if you let us know where it's headed.
- I was working towards this myself recently with a series (not all in one) PRs already merged. I had to put it on the shelf in order to get some other serious bug reports resolved, and take over things like @SSoulaimane 's abandoned PR. I want to get it done because it will help me in debugging other platforms without needing a setup for those platforms.
Thanks, I've been looking for this for a while. I'll see if there's a way to set it up that does not break DMC all the time.
Commits do not get squashed unless someone squash them, which would be a mistake. But point taken, I'll submit them separately.
Which is why I actually done this, as I imagined it'd be uncontroversial. |
@WalterBright : I hope DigitalMars/Compiler#12 can be a good way forward. |
platform independence has been achieved by #12508 closing. Please reopen if this adds something that PR doesn't fix |
If we want the backend to support cross compilation, it needs to receive the target platform from the driver.
So the first step is actually in backconfig. In the process of removing static condition, I removed duplicated functions.
Better reviewed commit-by-commit and with whitespace diff off (it makes the diff rather trivial, except for the
util_set{32,64}
merge).