Skip to content

Commit 4238280

Browse files
pythongh-117752: Autoconf: silence some clang warnings for PGO builds
* -Wno-profile-instr-unprofiled for source files without profile data * -Wno-profile-instr-out-of-date for _bootstrap_python.c
1 parent 25f6ff5 commit 4238280

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

configure

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

configure.ac

+10-2
Original file line numberDiff line numberDiff line change
@@ -2011,7 +2011,11 @@ 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"
2014+
PGO_PROF_USE_FLAG=m4_normalize("
2015+
-fprofile-instr-use=code.profclangd
2016+
-Wno-profile-instr-unprofiled
2017+
-Wno-profile-instr-out-of-date
2018+
")
20152019
LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
20162020
LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
20172021
if test $LLVM_PROF_FOUND = not-found
@@ -2027,7 +2031,11 @@ 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"
2034+
PGO_PROF_USE_FLAG=m4_normalize("
2035+
-fprofile-instr-use=code.profclangd
2036+
-Wno-profile-instr-unprofiled
2037+
-Wno-profile-instr-out-of-date
2038+
")
20312039
LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
20322040
LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
20332041
if test "${LLVM_PROF_FOUND}" = "not-found"

0 commit comments

Comments
 (0)