www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - DMD release compiler flags when building with GDC

reply Per =?UTF-8?B?Tm9yZGzDtnc=?= <per.nordlow gmail.com> writes:
I've noticed that the make flag ENABLE_LTO=1 fails as

     Error: unrecognized switch '-flto=full'

when building dmd with GDC 9.

Does gdc-9 support lto? If so what flags should I use?

If not what are the preferred DFLAGS when building dmd with gdc?
Nov 09 2019
parent reply Johannes Pfau <nospam example.com> writes:
Am Sat, 09 Nov 2019 20:43:20 +0000 schrieb Per Nordlöw:

 I've noticed that the make flag ENABLE_LTO=1 fails as
 
      Error: unrecognized switch '-flto=full'
 
 when building dmd with GDC 9.
 
 Does gdc-9 support lto? If so what flags should I use?
 
 If not what are the preferred DFLAGS when building dmd with gdc?
I think -flto is the proper flag for GCC/GDC. I don't know if LTO is working though. A long time ago there were some bugs, but maybe that's been fixed. You probably just have to try and see ;-) -- Johannes
Nov 10 2019
parent Per =?UTF-8?B?Tm9yZGzDtnc=?= <per.nordlow gmail.com> writes:
On Sunday, 10 November 2019 at 15:59:22 UTC, Johannes Pfau wrote:
 I think -flto is the proper flag for GCC/GDC. I don't know if 
 LTO is working though. A long time ago there were some bugs, 
 but maybe that's been fixed. You probably just have to try and 
 see ;-)
Thanks
Nov 10 2019