[phobos] MODEL inference
Jonathan M Davis
jmdavisProg at gmx.com
Wed May 29 21:04:11 PDT 2013
On Wednesday, May 29, 2013 23:30:12 Andrei Alexandrescu wrote:
> I'm seeing this is phobos/posix.mak:
>
> MODEL:=default
> ifneq (default,$(MODEL))
> MODEL_FLAG:=-m$(MODEL)
> endif
>
> I find it unpleasant that we have directories
> generated/xxx/yyy/{32,64,default} of which default is identical to another.
>
> Is there a simple and robust technique to detect the default model on a
> given platform?
My first thought would be to compile a program and see what size size_t was,
but I don't know feasible that is from inside of make. There's probably some
way to get make to tell you, but I'm not very well versed in make.
Timothee Cour has expressed interest in replacing all of the makefiles with D
programs that do the build wth the idea that it would be easier to manage the
various architectures and OSes that way. And if we did that, then all you'd
have to do would be to check the size of size_t within the build script with
size_t.sizeof.
- Jonathan M Davis
More information about the phobos
mailing list