Specify LDC to compile specific files
Michelle Long
HappyDance321 at gmail.com
Sun Mar 3 16:44:30 UTC 2019
On Saturday, 2 March 2019 at 17:03:20 UTC, Jacob Carlborg wrote:
> On 2019-03-02 05:49, Michelle Long wrote:
>> The problem with LDC is that it is very slow to compile. About
>> 10x slower than dmd. Unfortunately certain things need ldc to
>> function such as dcompute.
>>
>> It would be nice if one could specify certain files to compile
>> for ldc only.
>>
>>
>> I guess the only way to accomplish this is to create a new
>> project in the solution and use LDC for that?
>
> Perhaps this is a question specific for Visual Studio and I'm
> not sure exactly what you're looking for. But generally
> speaking you could add `version (LDC):` at the top of a file
> and it would only be compiled if LDC is the compiler.
>
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.
If they are not ABI it might be a real problem getting it 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?
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).
More information about the Digitalmars-d-ide
mailing list