[dmd-beta] 2.066.1

Sönke Ludwig via dmd-beta dmd-beta at puremagic.com
Thu Oct 30 00:12:55 PDT 2014


Am 27.10.2014 21:49, schrieb Andrei Alexandrescu:
> On 10/27/14 1:23 PM, Martin Nowak wrote:
>> On 10/27/2014 08:24 PM, Andrei Alexandrescu wrote:
>>> On 10/27/14 12:09 PM, Martin Nowak wrote:
>>>> On 10/27/2014 06:57 AM, Andrei Alexandrescu wrote:
>>>>>
>>>>> Martin, Sönke, do you think we can bring dub to the point we don't 
>>>>> rely
>>>>> on machine specifics (i.e. dmd.conf) to build everything? That might
>>>>> mean extra options.
>>>>
>>>> While specifying include and library paths on the dub command line can
>>>> definitely be done. Not so sure whether that fits into dub's approach.
>>>
>>> Fair enough. One possible argument is that setting the compiler entails
>>> setting flags, too (because e.g. gdc and dmd have different flags).
>>
>> Dub has an abstraction shim to unify compiler flags.
>> http://code.dlang.org/package-format#build-requirements
>> http://code.dlang.org/package-format#build-options
>>
>> You'd use `dub build -b release` for an optimzed build regardless of
>> what compiler you chose.
>
> I see, thanks. That would suggest it would be appropriate to add a -I 
> flag that allows setting the include path for all compilers.
>

It's possible to manually set compiler flags using the DFLAGS 
environment variable:

DFLAGS="-I/some/path -release -O -inline" dub build

It overrides any package specific "build type" settings.

Sönke


More information about the dmd-beta mailing list