Compiler Specific dub Dependencies
Mike Parker via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed Mar 23 20:21:15 PDT 2016
On Wednesday, 23 March 2016 at 20:30:04 UTC, Jack Stouffer wrote:
> Is there any way in dub to specify that a module should only be
> linked and compiled for DMD and not for LDC?
>
> I am using the Economic Modeling containers library, and
> because it uses std.experimental.allocator, it can't be used
> with LDC through dub. I have coded in such a way with static
> if's that LDC will still compile without it, but dub will try
> to compile it anyway because it's in the dependencies JSON
> dictionary.
I would try using a default configuration with a platform
specification. Never done it before, but it would look like this
in SDLang:
configuration "default-app" {
platforms "dmd"
}
http://code.dlang.org/package-format?lang=sdl#configuration-settings
http://code.dlang.org/package-format?lang=json#configuration-settings
More information about the Digitalmars-d-learn
mailing list