"It greatly increases build time so it must be disabled by default." is not good justification. In fact, that enabling optimization increases build time, is good motivation to *enable* it by default, so that most users will be able to use binary packages.
However, if enabling profiling makes it worse for other use-cases, other hardware, or other other uses, *that* would be good motivation for disabling PGO. On Sat, 7 Jul 2018 at 19:43, David Gilman <[email protected]> wrote: > > Joshua Root (jmroot) pushed a commit to branch master > in repository macports-ports. > > https://github.com/macports/macports-ports/commit/b12ed55d4d24c9f1b713d616162371efbb5820e4 > > The following commit(s) were added to refs/heads/master by this push: > new b12ed55 Add optimizations variant to python{27,35,36,37} > b12ed55 is described below > > commit b12ed55d4d24c9f1b713d616162371efbb5820e4 > Author: David Gilman <[email protected]> > AuthorDate: Thu Jul 5 19:27:24 2018 -0400 > > Add optimizations variant to python{27,35,36,37} > > This flag does PGO (profile-guided optimization) and LTO (link-time > optimization) on builds of the Python interpreter. It greatly increases > build time so it must be disabled by default. > --- > lang/python27/Portfile | 4 ++++ > lang/python35/Portfile | 4 ++++ > lang/python36/Portfile | 4 ++++ > lang/python37/Portfile | 4 ++++ > 4 files changed, 16 insertions(+) > > diff --git a/lang/python27/Portfile b/lang/python27/Portfile > index 4ba6626..3f6f6ec 100644 > --- a/lang/python27/Portfile > +++ b/lang/python27/Portfile > @@ -165,6 +165,10 @@ variant ucs4 description {Enable support for UCS4} { > configure.args-append --enable-unicode=ucs4 > } > > +variant optimizations description {Compile with LTO and PGO. Build time > greatly increased} { > + configure.args-append --enable-optimizations > +} > + > livecheck.type regex > livecheck.url ${homepage}downloads/ > livecheck.regex Python (${branch}(?:\\.\\d+)*) > diff --git a/lang/python35/Portfile b/lang/python35/Portfile > index d7989e8..b6aaf3f 100644 > --- a/lang/python35/Portfile > +++ b/lang/python35/Portfile > @@ -174,6 +174,10 @@ variant universal { > } > } > > +variant optimizations description {Compile with LTO and PGO. Build time > greatly increased} { > + configure.args-append --enable-optimizations > +} > + > livecheck.type regex > livecheck.url ${homepage}downloads/source/ > livecheck.regex Python (${branch}(?:\\.\\d+)*) > diff --git a/lang/python36/Portfile b/lang/python36/Portfile > index 346d021..cc0e24e 100644 > --- a/lang/python36/Portfile > +++ b/lang/python36/Portfile > @@ -190,6 +190,10 @@ variant universal { > } > } > > +variant optimizations description {Compile with LTO and PGO. Build time > greatly increased} { > + configure.args-append --enable-optimizations > +} > + > livecheck.type regex > livecheck.url ${homepage}downloads/source/ > livecheck.regex Python (${branch}(?:\\.\\d+)*) > diff --git a/lang/python37/Portfile b/lang/python37/Portfile > index 05ce818..14caecc 100644 > --- a/lang/python37/Portfile > +++ b/lang/python37/Portfile > @@ -191,6 +191,10 @@ variant universal { > } > } > > +variant optimizations description {Compile with LTO and PGO. Build time > greatly increased} { > + configure.args-append --enable-optimizations > +} > + > livecheck.type regex > livecheck.url ${homepage}downloads/source/ > livecheck.regex Python (${branch}\[.0-9abrc\]+) > -- Eitan Adler
