Message332153
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
... |
|
Date |
User |
Action |
Args |
2018-12-19 17:05:29 | vstinner | set | recipients:
+ vstinner, ned.deily, eric.araujo, dstufft, cstratak, hroncok |
2018-12-19 17:05:29 | vstinner | set | messageid: <1545239129.6.0.788709270274.issue35257@psf.upfronthosting.co.za> |
2018-12-19 17:05:29 | vstinner | link | issue35257 messages |
2018-12-19 17:05:29 | vstinner | create | |
|