Fix unoptimized wheels#152
Conversation
setuptools starting from version 75.7.0 changed how CFLAGS work: They no
longer are added to the CFLAGS Python was compiled with, but replace them.
With this change, our CFLAGS of `-g0 -DNDEBUG` get used directly and the
wheels are compiled without proper optimizations because `-O2` is missing.
Within cibuildwheel, the Python compiler options are:
-fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall
Of these, we really only require `-O3` and `-DNDEBUG`, so the easiest fix
should be to just add `-O3` to the CFLAGS that we provide.
Found by @rhpvorderman in marcelm/cutadapt#843
|
I checked all of the included pythons: Some of them allso use |
|
Agreed, and thanks for checking! So ok to merge? |
|
Yes! And thanks for looking at the CFLAGS. I will update sequali again. For now 1.0.1 with the "big wheels" is fine, but next release I want to make sure that the debug information is gone. I will have the shakespearian dialogue with myself "To -O3 or not -O3" and decide whether I shall use -O3 or -O2 by default. O3 has better autovectorization, but is sometimes too greedy. I think I will go that route as greedy algorithms are usually quite favourable for our data (150 bp strings at least). |
setuptools starting from version 75.7.0 changed how CFLAGS work: They no longer are added to the CFLAGS Python was compiled with, but replace them.
With this change, our CFLAGS of
-g0 -DNDEBUGget used directly and the wheels are compiled without proper optimizations because-O2is missing.Within cibuildwheel, the Python compiler options that we "lose" by this change are:
Of these, we really only require
-O3and-DNDEBUG, so the easiest fix should be to just add-O3to the CFLAGS that we provide.Found by @rhpvorderman in marcelm/cutadapt#843