From 0c1a7136725314e28639a85a6dad77017b7613b9 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Tue, 3 Oct 2023 18:43:23 +0200 Subject: [PATCH] gh-110276: No longer ignore PROFILE_TASK failure silently (#110295) --- Doc/using/configure.rst | 3 +++ Makefile.pre.in | 4 ++-- .../next/Build/2023-10-03-17-55-09.gh-issue-110276.luaKRg.rst | 2 ++ 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 Misc/NEWS.d/next/Build/2023-10-03-17-55-09.gh-issue-110276.luaKRg.rst diff --git a/Doc/using/configure.rst b/Doc/using/configure.rst index 83b4c7aa0481e9a..eb8f2442d0f0a62 100644 --- a/Doc/using/configure.rst +++ b/Doc/using/configure.rst @@ -518,6 +518,9 @@ also be used to improve performance. .. versionadded:: 3.8 + .. versionchanged:: 3.13 + Task failure is no longer ignored silently. + .. cmdoption:: --with-lto=[full|thin|no|yes] Enable Link Time Optimization (LTO) in any build (disabled by default). diff --git a/Makefile.pre.in b/Makefile.pre.in index cf03c86f18b3c3c..97eb767b8fcdebe 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -657,7 +657,7 @@ profile-run-stamp: $(MAKE) profile-gen-stamp # Next, run the profile task to generate the profile information. @ # FIXME: can't run for a cross build - $(LLVM_PROF_FILE) $(RUNSHARED) ./$(BUILDPYTHON) $(PROFILE_TASK) || true + $(LLVM_PROF_FILE) $(RUNSHARED) ./$(BUILDPYTHON) $(PROFILE_TASK) $(LLVM_PROF_MERGER) # Remove profile generation binary since we are done with it. $(MAKE) clean-retain-profile @@ -706,7 +706,7 @@ profile-bolt-stamp: $(BUILDPYTHON) mv "$${bin}.bolt_inst" "$${bin}"; \ done # Run instrumented binaries to collect data. - $(RUNSHARED) ./$(BUILDPYTHON) $(PROFILE_TASK) || true + $(RUNSHARED) ./$(BUILDPYTHON) $(PROFILE_TASK) # Merge all the data files together. for bin in $(BOLT_BINARIES); do \ @MERGE_FDATA@ $${bin}.*.fdata > "$${bin}.fdata"; \ diff --git a/Misc/NEWS.d/next/Build/2023-10-03-17-55-09.gh-issue-110276.luaKRg.rst b/Misc/NEWS.d/next/Build/2023-10-03-17-55-09.gh-issue-110276.luaKRg.rst new file mode 100644 index 000000000000000..392203d21ca45d4 --- /dev/null +++ b/Misc/NEWS.d/next/Build/2023-10-03-17-55-09.gh-issue-110276.luaKRg.rst @@ -0,0 +1,2 @@ +No longer ignore :envvar:`PROFILE_TASK` failure silently: command used by +Profile Guided Optimization (PGO). Patch by Victor Stinner.