RejectedSoftware Forums

Sign up

Default architecture to 64-bit on Windows

Is there a way to change the default architecture to 64-bit on Windows by specifying that in the dub.json file, or in an environment variable?

More generally, can you specify an architecture override in dub.json, instead of having to type --arch=XXX in the command line each time?

Re: Default architecture to 64-bit on Windows

On Wed, 22 Mar 2017 21:09:10 GMT, Luís Marques wrote:

Is there a way to change the default architecture to 64-bit on Windows by specifying that in the dub.json file, or in an environment variable?

More generally, can you specify an architecture override in dub.json, instead of having to type --arch=XXX in the command line each time?

There is no configuration option at the moment, but it would make sense to add one in analogy to the "defaultCompiler" setting. Making some of these things configurable using environment variables also don't sound like a bad idea. It would just be important to think about the implications that may have on other parts (e.g. scripts called by DUB have DUB_ARCH already set automatically, so if those call DUB and the variable to control the architecture is called the same, it would influence the result).

The best workaround for now is presumably to create an alias or a small wrapper batch file.