Author: Matti Picus <matti.pi...@gmail.com> Branch: Changeset: r91529:c6a3a65d4975 Date: 2017-06-05 21:12 +0300 http://bitbucket.org/pypy/pypy/changeset/c6a3a65d4975/
Log: move lto to build option, default is False since some gcc versions produce bogus code diff --git a/rpython/config/translationoption.py b/rpython/config/translationoption.py --- a/rpython/config/translationoption.py +++ b/rpython/config/translationoption.py @@ -202,6 +202,9 @@ BoolOption("lldebug0", "If true, makes an lldebug0 build", default=False, cmdline="--lldebug0"), + BoolOption("lto", "enable link time optimization", + default=False, cmdline="--lto", + requires=[("translation.gcrootfinder", "shadowstack")]), StrOption("icon", "Path to the (Windows) icon to use for the executable"), StrOption("libname", "Windows: name and possibly location of the lib file to create"), diff --git a/rpython/translator/platform/posix.py b/rpython/translator/platform/posix.py --- a/rpython/translator/platform/posix.py +++ b/rpython/translator/platform/posix.py @@ -134,7 +134,7 @@ cflags = tuple(self.cflags) + tuple(self.standalone_only) # xxx check which compilers accept this option or not - if not config or config.translation.gcrootfinder != 'asmgcc': + if config and config.translation.lto: cflags = ('-flto',) + cflags m = GnuMakefile(path) _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit