DMD release compiler flags when building with LDC

Per Nordlöw per.nordlow at gmail.com
Wed Oct 23 09:49:57 UTC 2019


On Tuesday, 22 October 2019 at 18:55:03 UTC, kinke wrote:
> On Tuesday, 22 October 2019 at 14:02:28 UTC, Per Nordlöw wrote:
>>     ENABLE_LTO=1 \
>
> This has exactly 0 effect on DMD itself, from DMD's 
> src/posix.mak:
>
> ifdef ENABLE_LTO
> CXXFLAGS  += -flto
> endif

So, I presume we could set

ifdef ENABLE_LTO
DFLAGS += -flto=full
endif

in the case when `HOST_DC` is either `ldmd2` or `ldc2` then, 
right?

This works for me.


More information about the Digitalmars-d mailing list