Skip to content

Commit 8280f2b

Browse files
erlend-aaslanddiegorusso
authored andcommitted
pythongh-117752: Autoconf: fix PGO builds for 'make -C build' incantations (python#117803)
1 parent a415c94 commit 8280f2b

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
@@ -2011,8 +2011,12 @@ case "$CC_BASENAME" in
20112011
*clang*)
20122012
# Any changes made here should be reflected in the GCC+Darwin case below
20132013
PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
2014-
PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
2015-
LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
2014+
PGO_PROF_USE_FLAG="-fprofile-instr-use=\"\$(shell pwd)/code.profclangd\""
2015+
LLVM_PROF_MERGER=m4_normalize("
2016+
${LLVM_PROFDATA} merge
2017+
-output=\"\$(shell pwd)/code.profclangd\"
2018+
\"\$(shell pwd)\"/*.profclangr
2019+
")
20162020
LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"\$(shell pwd)/code-%p.profclangr\""
20172021
if test $LLVM_PROF_FOUND = not-found
20182022
then
@@ -2027,8 +2031,12 @@ case "$CC_BASENAME" in
20272031
case $ac_sys_system in
20282032
Darwin*)
20292033
PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
2030-
PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
2031-
LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
2034+
PGO_PROF_USE_FLAG="-fprofile-instr-use=\"\$(shell pwd)/code.profclangd\""
2035+
LLVM_PROF_MERGER=m4_normalize("
2036+
${LLVM_PROFDATA} merge
2037+
-output=\"\$(shell pwd)/code.profclangd\"
2038+
\"\$(shell pwd)\"/*.profclangr
2039+
")
20322040
LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"\$(shell pwd)/code-%p.profclangr\""
20332041
if test "${LLVM_PROF_FOUND}" = "not-found"
20342042
then

0 commit comments

Comments
 (0)