[phobos] win64 and visual studio path crap
r.sagitario at gmx.de
Mon Sep 30 13:47:01 PDT 2013
On 28.09.2013 00:13, Brad Roberts wrote:
> I know this topic has come up in various forms, but no good resolution
> has yet been codified. I need to reduce the amount of hand hacking done
> inside the auto-tester that's specific to visual studio paths and
> win64. The local patches conflicted with a pull request that's also
> trying to do some cleanup in this area. I just pulled that request and
> re-did my local changes, but I think the problem needs to be addressed.
> The paths wander from version to version, including the directory
> structure inside the compiler main directory. IMHO, the makefiles need
> to stop trying to set the paths an instead pull them from the environment.
> What I've done with the auto-tester is:
> 1) set in the environment 4 variables:
> export VCDIR="C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC"
> export SDKDIR="C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A"
> export VCBIN_DIR="$VCDIR\bin\x86_amd64"
> export INCLUDE="$VCDIR\include"
> 2) apply a set of patches to druntime/win64.mak, phobos/win64.mak,
> phobos/etc/c/zlib/win64.mak that look basically like:
> diff --git a/win64.mak b/win64.mak
> index daee7f6..b381a34 100644
> --- a/win64.mak
> +++ b/win64.mak
> @@ -2,14 +2,11 @@
> -VCDIR=\Program Files (x86)\Microsoft Visual Studio 10.0\VC
> -SDKDIR=\Program Files (x86)\Microsoft SDKs\Windows\v7.0A
> A similar one to use the env rather than a hardcoded value in
> I hate breaking changes, so any thoughts on how to make this suck less
> without breaking people building on win64? Alternately, if you're among
> the probably relatively few people building on win64, would you object
> to this change?
What I do is to use the VS console and pass CC and AR on the command
line as well:
%dm_make% -f win64.mak DMD=%DMD% "CC=\"%cl64%\"" target
%dm_make% -f win64.mak DMD=%DMD% "CC=\"%cl64%\"" MAKE=%dm_make%
I'm not sure if the mix of forward and backward slashes is necessary.
Probably not for win64.mak, but for posix.mak which I normally use under
More information about the phobos