Simplify Visual C configuration for -m64/-m32mscoff builds#960
Simplify Visual C configuration for -m64/-m32mscoff builds#960CyberShadow wants to merge 1 commit intodlang:masterfrom
Conversation
b27bb23 to
fcdfd39
Compare
|
Crap, why is this failing? What |
fcdfd39 to
84e8fbd
Compare
|
Why is this failing?!? I can't reproduce this with any |
|
Searching for the error message shows that it is emitted by DigitalMars |
|
Sorry for being late at commenting, I could have warned about the makefile being patched. I'm not sure making the sub-directory a dependent option is the best approach. How about specifying the bin path as patched by the build-server? BTW: link/lib are not used, so specifying CC on the command line is good enough. That is what I am doing. Regarding errno.c: I'd rather like to see the object files in different directories (that will need more patches, though). I don't think building works across platforms without cleaning up yet. At least, you'll also have to patch the zlib makefile in phobos aswell to make that work. |
|
The two changes (druntime and phobos) should be essentially the same rather than subtly different in how VCBINDIR is defined. I'll deal with cleaning up the auto-tester end of things. This ought to allow me to remove one of the last reasons there's an external diff applied at all. Something I should have done ages ago. |
That's another way to do it. I was thinking that splitting up the path parts would allow e.g. compiling for 32 and 64 bits in the same makefile in the future, or easily choosing a VS version (e.g.
Yeah, I was going back and forth trying different things while trying to figure out the autotester failure. I considered that the leading backslash was triggering some special syntax.
One effect of the autotester patch is that it removes the definition from the makefiles completely, causing |
|
I really don't want to have to have make invoked differently based on OS. Adding VCBINDIR to all make invocations wouldn't be the worst thing in the world, but it'd be really dumb to include for non-win64 environments. The best we can do with the digitalmars make, given its macro rule logic and inability to do this sort of default setting, is to also set MAKEFLAGS to "VDBINDIR=path" in the environment. I've never tried that, but it ought to work. |
84e8fbd to
054cce6
Compare
lib appears to be used when building zlib, no? Or it doesn't matter which bitness the librarian it is?
I noticed the build scripts are already customizing Make's command line ( But Anyway, updated. Now there is |
win64.mak
Outdated
There was a problem hiding this comment.
Move at least the 'bin' part ouf of VCBIN_DIR into VCBIN_SUBDIR. Maybe the \ as well. If you're going to make it overridable, don't go just half way.
There was a problem hiding this comment.
Why? I don't think it's even possible to install VS in a way that this would ever be useful, and for those cases you can just override VCBIN_DIR instead.. It would just make the shortest command line for m32mscoff or cross-compilation longer than necessary.
There was a problem hiding this comment.
Why? I don't think it's even possible to install VS in a way that this would ever be useful
Actually I have an extracted a few files from VS2010 to get a small reference version that works building and debugging phobos (65 MB), and the folders are actually named differently ;-)
I think using VCBIN_SUBDIR=bin is even a bit more obvious than specifying an empty argument.
054cce6 to
0e7a02b
Compare
0e7a02b to
e041523
Compare
|
OK, updated. |
|
LGTM, though I'd still recommend to put "/.obj" into .gitignore instead of "/errno_c.obj" to exclude unittest.obj. Other refactorings can be added later. @braddr I guess this should now be good enough to run the test builds without patching the makefile. If you can adjust the tester, please pull. |
|
ping @braddr |
|
ping |
There was a problem hiding this comment.
You should use MODEL in the make file to set the VCBIN_SUBDIR.
Not sure if it can be done though, maybe double expansion works.
VCBIN_SUBDIR_64=bin\x86_64
VCBIN_SUBDIR=$(VCBIN_SUBDIR_$(MODEL))
There was a problem hiding this comment.
Unfortunately, DM make cannot do that.
|
I know little to nothing about VC integration. What problem does this pull solve? |
Also fix rebuilding without clean due to errno_c.obj
e041523 to
72b6199
Compare
Makes it easier to build -m32mscoff Phobos/Druntime, or cross-compile 32-bit to 64-bit. |
|
Waiting for @braddr to do something with the auto-tester. We really need more people that can maintain the auto-tester, because Brad is a busy person and we too often get stuck. |
At mir we combined AppVeyor and Travis to test for Win32,Win64,Linux32,Linux64 and OS X 64 (OS X 32 has been deprecated for a couple of years). ping @braddr |
|
ping @braddr - do you have time to update the auto-tester? |
|
Druntime have been merged into DMD. Please re-submit your PR to |
Ping @rainers