Specify LDC to compile specific files

Jacob Carlborg doob at me.com
Sat Mar 2 17:03:20 UTC 2019


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.

If you're using Dub you can do something like:

"sourceFiles-ldc": ["some_file.d"]

-- 
/Jacob Carlborg


More information about the Digitalmars-d-ide mailing list