diff options
author | Victor Stinner <vstinner@redhat.com> | 2018-12-20 20:46:07 +0100 |
---|---|---|
committer | Ned Deily <nad@python.org> | 2018-12-20 14:46:07 -0500 |
commit | 782e1d537778d93eb4cba1343f71bfc51e7e3c00 (patch) | |
tree | 4ad3616d3f1ec49bb71e63636318ccc04b0939be | |
parent | 789b0ee023f14385a2fd635272768c3b55a99773 (diff) | |
download | cpython-git-782e1d537778d93eb4cba1343f71bfc51e7e3c00.tar.gz |
bpo-35499: make profile-opt don't override CFLAGS_NODIST (GH-11164) (GH-11267)
"make profile-opt" no longer replaces CFLAGS_NODIST with CFLAGS. It
now adds profile-guided optimization (PGO) flags to CFLAGS_NODIST,
existing CFLAGS_NODIST flags are kept.
(cherry picked from commit 640ed520dd6a43a8bf470b79542f58b5d57af9de)
-rw-r--r-- | Makefile.pre.in | 4 | ||||
-rw-r--r-- | Misc/NEWS.d/next/Build/2018-12-14-19-36-05.bpo-35499.9yAldM.rst | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/Makefile.pre.in b/Makefile.pre.in index 258236d364..af9504dfac 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -472,7 +472,7 @@ profile-opt: $(MAKE) profile-removal build_all_generate_profile: - $(MAKE) @DEF_MAKE_RULE@ CFLAGS_NODIST="$(CFLAGS) $(PGO_PROF_GEN_FLAG)" LDFLAGS="$(LDFLAGS) $(PGO_PROF_GEN_FLAG)" LIBS="$(LIBS)" + $(MAKE) @DEF_MAKE_RULE@ CFLAGS_NODIST="$(CFLAGS_NODIST) $(PGO_PROF_GEN_FLAG)" LDFLAGS="$(LDFLAGS) $(PGO_PROF_GEN_FLAG)" LIBS="$(LIBS)" run_profile_task: : # FIXME: can't run for a cross build @@ -482,7 +482,7 @@ build_all_merge_profile: $(LLVM_PROF_MERGER) build_all_use_profile: - $(MAKE) @DEF_MAKE_RULE@ CFLAGS_NODIST="$(CFLAGS) $(PGO_PROF_USE_FLAG)" LDFLAGS="$(LDFLAGS)" + $(MAKE) @DEF_MAKE_RULE@ CFLAGS_NODIST="$(CFLAGS_NODIST) $(PGO_PROF_USE_FLAG)" LDFLAGS="$(LDFLAGS)" # Compile and run with gcov .PHONY=coverage coverage-lcov coverage-report diff --git a/Misc/NEWS.d/next/Build/2018-12-14-19-36-05.bpo-35499.9yAldM.rst b/Misc/NEWS.d/next/Build/2018-12-14-19-36-05.bpo-35499.9yAldM.rst new file mode 100644 index 0000000000..ed730b9d9b --- /dev/null +++ b/Misc/NEWS.d/next/Build/2018-12-14-19-36-05.bpo-35499.9yAldM.rst @@ -0,0 +1,3 @@ +``make profile-opt`` no longer replaces ``CFLAGS_NODIST`` with ``CFLAGS``. It +now adds profile-guided optimization (PGO) flags to ``CFLAGS_NODIST``: existing +``CFLAGS_NODIST`` flags are kept. |