-
-
Couldn't load subscription status.
- Fork 655
convert divcoeff.c to D #6907
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
convert divcoeff.c to D #6907
Conversation
d95376b to
20e5971
Compare
|
There's a Visual Stdio project file as well. |
|
I'm having enough trouble getting these makefiles to work. |
|
It looks like circleci is using an older dmd to compile. It needs to be upgraded to 2.074.1 |
Simply bump it here: |
11f956e to
1e5c9ba
Compare
|
Thanks! That did the trick on circleci. |
|
As said per mail, neither gdc nor ldc support anything like |
|
Sorry, doesn't look like this is using |
|
Some info on why you need to update the required compiler would be helpful! |
src/ddmd/backend/divcoeff.d
Outdated
| * License: Distributed under the Boost Software License, Version 1.0. | ||
| * http://www.boost.org/LICENSE_1_0.txt | ||
| * Source: https://github.com/dlang/dmd/blob/master/src/ddmd/backend/divcoeff.c | ||
| * Source: https://github.com/dlang/dmd/blob/master/src/ddmd/backend/divcoeff.d |
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.
How about?
$(DMDSRC backend/_divcoeff.d)
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.
yes please
|
My guess is that some compilers (or ancient perl wrappers) don't understand |
Ah yes, that's another problem. Why do we need |
Well, it looks like You could workaround by building with |
The older compiler generated code that was looking for the module assert() function in
I picked this module because it didn't require
The backend doesn't use any D features that require druntime, so I wanted to dogfood and get
This is the same thing that was causing the circleci failures. The solution is to move to a newer D compiler. |
|
Essentially, it's time to move forward with converting the backend to D. To that end, gdc, ldc, and the build process needs to support:
None of these are tricky or difficult. To that end, divcoeff.d is a trial run to see where the issues are in the toolchain for doing this. Looks like it's doing its job :-) |
|
Making compilers support features that have not made it to stable (or even in a release) is probably asking for a bit too much. |
These changes are simple and not controversial. Let's move forward with them. |
|
OK I'll pull the switch on this to get in once it passes tests. |
|
CC @CyberShadow for updating DAutoTest |
|
@WalterBright Just so we're on the same page, please describe the procedure for building DMD master (incl. this pull request) from scratch without a host DMD compiler (C++ only). |
|
Didn't we just agree that 30% speedup from building dmd with gdc is worthwhile for an upcoming release? This would block this option for quite a while. Also jumping ahead with using latest edge features sets quite a bad precedence for dmd/gdc/ldc compatibility. |
|
Consider that the oldest compiler building DMD IIRC is using v2.066 of the front-end. I think it's safe to do a leap to 2.068, possibly 2.070 at latest, but I don't really want to break builds when using a release that is not strictly that old. |
bb771ec to
9103a7c
Compare
9103a7c to
d819bba
Compare
|
Regarding the current failure: I think you need to add |
d819bba to
298b7d3
Compare
298b7d3 to
5f059d5
Compare
5f059d5 to
d3a3135
Compare
d3a3135 to
2169a1c
Compare
|
Walter, the bot comment is going to keep coming back every time there's a new commit. If it doesn't see it's own comment to update, it makes a new one. |
That's not working, then, because I'd delete 10 of them in a row, not one at a time. |
|
so... pull? |
AFAICT we are still waiting for GDC to catch up or someone to fork the
|
|
Rebooted as #7714 because I could not get |
Not sure what you did, but it works fine for me: > go pr/6907
> git rebase upstream/master
First, rewinding head to replay your work on top of it...
Applying: convert divcoeff.c to D
Using index info to reconstruct a base tree...
A circleci.sh
A src/ddmd/backend/cod2.c
A src/ddmd/backend/divcoeff.c
M src/posix.mak
M src/win32.mak
Falling back to patching base and 3-way merge...
Auto-merging src/win32.mak
Auto-merging src/posix.mak
CONFLICT (content): Merge conflict in src/posix.mak
CONFLICT (rename/rename): Rename "src/ddmd/backend/divcoeff.c"->"src/dmd/backend/divcoeff.c" in branch "HEAD" rename "src/ddmd/backend/divcoeff.c"->"src/ddmd/backend/divcoeff.d" in "convert divcoeff.c to D"
Auto-merging src/dmd/backend/cod2.c
Auto-merging .circleci/run.sh
error: Failed to merge in the changes.
Patch failed at 0001 convert divcoeff.c to D
The copy of the patch that failed is found in: .git/rebase-apply/patch
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
> git mergetool
Merging:
src/ddmd/backend/divcoeff.c
src/ddmd/backend/divcoeff.d
src/dmd/backend/divcoeff.c
src/posix.mak
Deleted merge conflict for 'src/ddmd/backend/divcoeff.c':
{local}: deleted
{remote}: deleted
Use (m)odified or (d)eleted file, or (a)bort? d
Deleted merge conflict for 'src/ddmd/backend/divcoeff.d':
{local}: deleted
{remote}: created file
Use (c)reated or (d)eleted file, or (a)bort? c
Deleted merge conflict for 'src/dmd/backend/divcoeff.c':
{local}: created file
{remote}: deleted
Use (c)reated or (d)eleted file, or (a)bort? d
Normal merge conflict for 'src/posix.mak':
{local}: modified file
{remote}: modified file
Hit return to start merge resolution tool (kdiff3): |
first one in the back end!