Skip to content

Commit 0cb6d2f

Browse files
erlend-aaslandmiss-islington
authored andcommitted
pythongh-117752: Autoconf: fix PGO builds for 'make -C build' incantations (pythonGH-117803)
(cherry picked from commit 1ddbeae) Co-authored-by: Erlend E. Aasland <erlend@python.org>
1 parent 3f2f0cf commit 0cb6d2f

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

configure

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

configure.ac

+12-4
Original file line numberDiff line numberDiff line change
@@ -1987,8 +1987,12 @@ case $CC in
19871987
*clang*)
19881988
# Any changes made here should be reflected in the GCC+Darwin case below
19891989
PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
1990-
PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
1991-
LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
1990+
PGO_PROF_USE_FLAG="-fprofile-instr-use=\"\$(shell pwd)/code.profclangd\""
1991+
LLVM_PROF_MERGER=m4_normalize("
1992+
${LLVM_PROFDATA} merge
1993+
-output=\"\$(shell pwd)/code.profclangd\"
1994+
\"\$(shell pwd)\"/*.profclangr
1995+
")
19921996
LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"\$(shell pwd)/code-%p.profclangr\""
19931997
if test $LLVM_PROF_FOUND = not-found
19941998
then
@@ -2003,8 +2007,12 @@ case $CC in
20032007
case $ac_sys_system in
20042008
Darwin*)
20052009
PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
2006-
PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
2007-
LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
2010+
PGO_PROF_USE_FLAG="-fprofile-instr-use=\"\$(shell pwd)/code.profclangd\""
2011+
LLVM_PROF_MERGER=m4_normalize("
2012+
${LLVM_PROFDATA} merge
2013+
-output=\"\$(shell pwd)/code.profclangd\"
2014+
\"\$(shell pwd)\"/*.profclangr
2015+
")
20082016
LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"\$(shell pwd)/code-%p.profclangr\""
20092017
if test "${LLVM_PROF_FOUND}" = "not-found"
20102018
then

0 commit comments

Comments
 (0)