RejectedSoftware Forums

Sign up

Is it possible to use a non standard compiler with dub?

Ok, so the subject is a little misleading. I am planning a project that will be messing with sources and then invoke the compiler, but I want to be able to use it with dub. eg, all command line stuff is passed to the program and everything happens as usual. Is this possible to do with dub?

Re: Is it possible to use a non standard compiler with dub?

On 2014-09-25 07:10, Jebbs wrote:

Ok, so the subject is a little misleading. I am planning a project that will be messing with sources and then invoke the compiler, but I want to be able to use it with dub. eg, all command line stuff is passed to the program and everything happens as usual. Is this possible to do with dub?

You can specify which compiler to using when building with the
--compiler flag: "dub build --compiler=ldc". Hmm, I actually don't know
if it expects a path to a binary or specific values, like "dmd", "ldc"
and so on.

/Jacob Carlborg

Re: Is it possible to use a non standard compiler with dub?

On Thu, 25 Sep 2014 22:17:56 +0200, Jacob Carlborg wrote:

On 2014-09-25 07:10, Jebbs wrote:

Ok, so the subject is a little misleading. I am planning a project that will be messing with sources and then invoke the compiler, but I want to be able to use it with dub. eg, all command line stuff is passed to the program and everything happens as usual. Is this possible to do with dub?

You can specify which compiler to using when building with the
--compiler flag: "dub build --compiler=ldc". Hmm, I actually don't know
if it expects a path to a binary or specific values, like "dmd", "ldc"
and so on.

/Jacob Carlborg

I'll play around with it and see what I can do. After looking at the source I'm not sure how well it'll work out though..