-
-
Notifications
You must be signed in to change notification settings - Fork 31.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Weird PGO build issue on macOS 14.3 #117752
Comments
Related to |
Related issues:
UPDATE: I kept #96398 open and closed the other as duplicates or superseded. Let's not forget this issue. |
This clang warning is also mentioned in issue #110577. Some of our For example, applying this patch (as hinted to in #110577) gets rid of the warning: diff --git a/configure.ac b/configure.ac
index e195e15b39..325b5b973b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1796,10 +1796,12 @@ if test "$Py_OPT" = 'true' ; then
DEF_MAKE_RULE="build_all"
case $CC in
*gcc*)
- AX_CHECK_COMPILE_FLAG([-fno-semantic-interposition],[
- CFLAGS_NODIST="$CFLAGS_NODIST -fno-semantic-interposition"
- LDFLAGS_NODIST="$LDFLAGS_NODIST -fno-semantic-interposition"
- ])
+ if test -n "${cc_is_clang}"; then
+ AX_CHECK_COMPILE_FLAG([-fno-semantic-interposition],[
+ CFLAGS_NODIST="$CFLAGS_NODIST -fno-semantic-interposition"
+ LDFLAGS_NODIST="$LDFLAGS_NODIST -fno-semantic-interposition"
+ ])
+ fi
;;
esac
elif test "$ac_sys_system" = "Emscripten" -o "$ac_sys_system" = "WASI"; then Footnotes
|
Force the compiler to issue an error if the flag is not supported.
Regarding this:
Try this patch: diff --git a/configure.ac b/configure.ac
index 60c4141a3d..2570fc5f32 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2013,7 +2013,7 @@ case "$CC_BASENAME" in
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"
- LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
+ LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"\$(shell pwd)/code-%p.profclangr\""
if test $LLVM_PROF_FOUND = not-found
then
LLVM_PROF_ERR=yes
@@ -2029,7 +2029,7 @@ case "$CC_BASENAME" in
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"
- LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
+ LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"\$(shell pwd)/code-%p.profclangr\""
if test "${LLVM_PROF_FOUND}" = "not-found"
then
LLVM_PROF_ERR=yes
This should also get rid of the "env changed" warnings, as profile data will now not interfere with the test environment. |
Moreover, we should consider compiling with |
…irectory This prevents spurious 'env changed' and llvm-profdata merge errors.
…ry (#117790) This prevents spurious 'env changed' and llvm-profdata merge errors.
…irectory (pythonGH-117790) This prevents spurious 'env changed' and llvm-profdata merge errors. (cherry picked from commit 396b831) Co-authored-by: Erlend E. Aasland <erlend@python.org>
* -Wno-profile-instr-unprofiled for source files without profile data * -Wno-profile-instr-out-of-date for _bootstrap_python.c
Force the compiler to issue an error if the flag is not supported.
…honGH-117789) Force the compiler to issue an error if the flag is not supported. (cherry picked from commit 49fc141) Co-authored-by: Erlend E. Aasland <erlend@python.org>
…tions (pythonGH-117803) (cherry picked from commit 1ddbeae) Co-authored-by: Erlend E. Aasland <erlend@python.org>
…irectory (python#117790) This prevents spurious 'env changed' and llvm-profdata merge errors.
…hon#117789) Force the compiler to issue an error if the flag is not supported.
With ./configure --enable-optimizations, the PGO build itself is a success on my machine, but the status is weird.
Following build warnings are emitted at the first build
During the profiling stage, several tests are not passed as before.
Also, writing profile files is in a weird status.
cc @ned-deily @ronaldoussoren @erlend-aasland
Linked PRs
Retargeted PRs:
The text was updated successfully, but these errors were encountered: