Skip to content

Commit

Permalink
pythongh-117752: Autoconf: fix PGO builds for 'make -C build' incanta…
Browse files Browse the repository at this point in the history
…tions (pythonGH-117803)

(cherry picked from commit 1ddbeae)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
  • Loading branch information
erlend-aasland authored and miss-islington committed Apr 12, 2024
1 parent 3f2f0cf commit 0cb6d2f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
8 changes: 4 additions & 4 deletions configure

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 12 additions & 4 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1987,8 +1987,12 @@ case $CC in
*clang*)
# Any changes made here should be reflected in the GCC+Darwin case below
PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
PGO_PROF_USE_FLAG="-fprofile-instr-use=\"\$(shell pwd)/code.profclangd\""
LLVM_PROF_MERGER=m4_normalize("
${LLVM_PROFDATA} merge
-output=\"\$(shell pwd)/code.profclangd\"
\"\$(shell pwd)\"/*.profclangr
")
LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"\$(shell pwd)/code-%p.profclangr\""
if test $LLVM_PROF_FOUND = not-found
then
Expand All @@ -2003,8 +2007,12 @@ case $CC in
case $ac_sys_system in
Darwin*)
PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
PGO_PROF_USE_FLAG="-fprofile-instr-use=\"\$(shell pwd)/code.profclangd\""
LLVM_PROF_MERGER=m4_normalize("
${LLVM_PROFDATA} merge
-output=\"\$(shell pwd)/code.profclangd\"
\"\$(shell pwd)\"/*.profclangr
")
LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"\$(shell pwd)/code-%p.profclangr\""
if test "${LLVM_PROF_FOUND}" = "not-found"
then
Expand Down

0 comments on commit 0cb6d2f

Please sign in to comment.