-
-
Notifications
You must be signed in to change notification settings - Fork 607
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 win64.mak #5694
Add win64.mak #5694
Conversation
Add support for building a 64-bit DMD using Microsoft Visual C++ without msbuild or needing to duplicate the project structure. This is done by adding wrappers for the DigitalMars C compiler and librarian, which translate the command-line parameters to the Microsoft equivalents.
Any chance we can move away from having scripts / build scripts from DMD's source directory ? |
Do you mean, moving them out into a separate repository? That would indubitably be a bad idea, as it would be harder to keep them in sync. Or do you mean to just move them out of the What would be the advantage, and how would it offset the cost of such a change? Regardless, this is orthogonal to the change presented here, since it is comparably a small addition to the |
What would be the cost ?
Yes. However I forgot we already have stuff in |
Breaking tools and scripts that depend on the current layout. Plus actually performing it. Any change has a cost. |
Looks quite good to me. I just tried but noticed a couple of issues (trying to build with VS2013):
|
Thanks for trying it!
Fixed, you can now specify which make program to use for recursive make invocations via
Fixed, thanks.
Broke this at the last second :) Fixed.
Fixed (by translating it to
I've tested it with the 2010 and 2013 vcvarsall scripts, and all seems to work now. |
The EH in iasm.c was removed ages ago, it should be fine to drop that flag completely. |
I don't think so. It still needs forwarding inside win32.mak (I added it to DMDMAKE).
This still happens for me if I use dmd and make from PATH, i.e. the default HOST_DMC=dmd. As this uses a previously built dmd.exe in the src folder, it is broken anyway. Specifying HOST_DC explicitely works now without the error. |
I don't think VS is to blame here, but Visual D. It does not allow to easily switch the used DMD from the comand line. I have some msbuild compatible "Build customization" in the pipe line, though. This would be independent of Visual D and could make the dmd path configurable on the command line, too. |
I think that's not necessary, because
This problem existed from before the DDMD transition. AFAIK,
You mean, integrating with msbuild or replacing it? |
It recurses twice for the release target.
Might be true when running msbuild.exe directly. It works when invoked through the IDE, i.e. building from the command line with devenv.exe. Also, newer version should follow the toolset selected in the project.
Integration into the VC projects. |
Ah, OK. Added.
But that would be a moot point since there's no way you can run the IDE without installing it, right? :) This is mainly from Digger's perspective, whose goal is to be able to build D on a fresh Windows install with nothing on it, where it downloads the necessary VS files, unpacks them on a subdirectory, and runs them from there. |
Yes, true. I guess even msbuild doesn't work without being installed on the system. |
Hmm, a dmd thus built crashes when building Phobos. What's the odds that it's a dmd bug? Stack trace:
|
@rainers I thought I'd try to use
I've reinstalled Visual D to be sure but that had no effect. |
IIRC there were some issues with dmd 2.068 regarding building for win64. Have you tried a later dmd version? |
I dont think Visual D is involved here. The message seems to come from the custom build steps of the backend VC project. Are you using VS2013 for this? I suspect VS2010 might not interpret the project correctly. |
Ah, thanks, that did it!
Yeah, VS2013. I guess the install on my Windows machine is broken. Well, no matter. |
Added support for this to Digger:
|
Auto-merge toggled on |
newArgs ~= "/Zi"; | ||
break; | ||
case "-wx": // "treat warnings as errors" | ||
newArgs ~= "/WX"; |
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 tried to build with VS2015 and it produced some more warnings. This caused a build failure due to this option. I think we should allow MS warnings as long as building this is not run as part of the auto tester.
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.
Wouldn't a better solution be to add it to vcbuild\warnings.h
?
I'd like us to test building this configuration. The VS build historically broke a lot.
Add support for building a 64-bit DMD using Microsoft Visual C++ without msbuild or needing to duplicate the project structure.
This is done by adding wrappers for the DigitalMars C compiler and librarian, which translate the command-line parameters to the Microsoft equivalents.
With this PR, I can build a 64-bit dmd.exe using just the following commands:
This change is needed for Digger be able to to reliably build a 64-bit DMD as well, because the msbuild solutions currently available always use the system-wide MSVC install, ignoring environment variables.
CC @rainers