cpython: 3103af76f4c4 (original) (raw)

Mercurial > cpython

changeset 101000:3103af76f4c4

Issue #25702: A --with-lto configure option has been added that will enable link time optimizations at build time during a make profile-opt. [#25702]

Gregory P. Smith greg@krypto.org
date Fri, 15 Apr 2016 16:58:51 -0700
parents e3c6362cc139(current diff)f16ec63055ad(diff)
children 7d61a991f405
files Makefile.pre.in Misc/NEWS configure configure.ac
diffstat 4 files changed, 87 insertions(+), 2 deletions(-)[+] [-] Makefile.pre.in 4 Misc/NEWS 6 configure 46 configure.ac 33

line wrap: on

line diff

--- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -504,7 +504,7 @@ profile-opt: $(MAKE) profile-removal build_all_generate_profile:

Compile and run with gcov

.PHONY=coverage coverage-lcov coverage-report

--- a/Misc/NEWS +++ b/Misc/NEWS @@ -976,6 +976,12 @@ Tests Build ----- +- Issue #25702: A --with-lto configure option has been added that will

--- a/configure +++ b/configure @@ -673,6 +673,7 @@ LLVM_PROF_FILE LLVM_PROF_MERGER PGO_PROF_USE_FLAG PGO_PROF_GEN_FLAG +LTOFLAGS ABIFLAGS LN MKDIR_P @@ -807,6 +808,7 @@ with_suffix enable_shared enable_profiling with_pydebug +with_lto with_hash_algorithm with_address_sanitizer with_libs @@ -1487,6 +1489,8 @@ Optional Packages: compiler --with-suffix=.exe set executable suffix --with-pydebug build with Py_DEBUG defined

Enable PGO flags.

--- a/configure.ac +++ b/configure.ac @@ -1235,6 +1235,39 @@ else AC_MSG_RESULT(no); Py_DEBUG='false' fi], [AC_MSG_RESULT(no)]) +# Enable LTO flags +AC_SUBST(LTOFLAGS) +AC_MSG_CHECKING(for --with-lto) +AC_ARG_WITH(lto, AS_HELP_STRING([--with-lto], [Enable Link Time Optimization in PGO builds. Disabled by default.]), +[ +if test "$withval" != no +then

Enable PGO flags.

AC_SUBST(PGO_PROF_GEN_FLAG) AC_SUBST(PGO_PROF_USE_FLAG)