Specify LDC to compile specific files

Jacob Carlborg doob at me.com
Mon Mar 4 16:59:10 UTC 2019


On 2019-03-03 17:44, Michelle Long wrote:

> But one can only select one compiler using the build configuration. So 
> in Visual D one has to use one compiler per project(one can switch at a 
> click but that is it).
> 
> So version is useless to be able to do both.
> 
> Visual D could have a combo but it would then require versioning all the 
> files.

Aha, you mean like that.

> If they are not ABI it might be a real problem getting it to work ;/

The ABIs of DMD and LDC don't exactly the same. You should not expect 
linking object files compiled with both compilers to work.

>> If you're using Dub you can do something like:
>>
>> "sourceFiles-ldc": ["some_file.d"]
> 
> 
> And doing so will use dmd for all the others, compile some_file.d using 
> ldc and then work all the details out?

No, it will compile "some_file.d" if the compiler being used is LDC, 
otherwise it will not be compiled.

> This is essentially what I'm asking for in Visual D so to speak. To mark 
> a file to use LDC and it will effectively do what dub is doing(if it is 
> doing it as I stated).

I misunderstood your question.

-- 
/Jacob Carlborg


More information about the Digitalmars-d-ide mailing list