STINNER Victor <vstin...@redhat.com> added the comment:
PGO+LTO build with PR 10900: I see PGO options (-fprofile-instr-generate then -fprofile-instr-use=code.profclangd) and LTO option (-flto) passed to the compiler and to the linker, as expected: $ git clean -fdx $ ./configure CC=clang --with-lto --prefix /opt/py38 --enable-optimizations $ sed -i -e 's/^PROFILE_TASK=.*/PROFILE_TASK=-c pass/' Makefile $ make ... # compile Python core clang ... -flto ... -fprofile-instr-generate ... Modules/main.c ... # link ./python program clang -pthread -flto -g -fprofile-instr-generate -Xlinker -export-dynamic -o python Programs/python.o libpython3.8m.a -lpthread -ldl -lutil -lm -lm ... # compile stdlib C extension clang ... -flto ... -fprofile-instr-generate ... -c /home/vstinner/prog/python/master/Modules/_heapqmodule.c ... ... rm -f profile-gen-stamp ... # compile Python core clang ... -flto ... -fprofile-instr-use=code.profclangd ... -o Programs/python.o ./Programs/python.c ... # link ./python program clang -pthread -flto -g -Xlinker -export-dynamic -o python Programs/python.o libpython3.8m.a -lpthread -ldl -lutil -lm -lm ... # build struct extension clang ... -flto ... -fprofile-instr-use=code.profclangd ... -c /home/vstinner/prog/python/master/Modules/_struct.c -o build/temp.linux-x86_64-3.8/home/vstinner/prog/python/master/Modules/_struct.o warning: no profile data available for file "_struct.c" [-Wprofile-instr-unprofiled] 1 warning generated. clang -pthread -shared -flto -g build/temp.linux-x86_64-3.8/home/vstinner/prog/python/master/Modules/_struct.o -L/opt/py38/lib -L/usr/local/lib -o build/lib.linux-x86_64-3.8/_struct.cpython-38m-x86_64-linux-gnu.so ... ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue35257> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com