-
Notifications
You must be signed in to change notification settings - Fork 148
Description
Hey,
It seems irresponsible to default to -O3
which is known to use "experimental" optimizations that sometimes even pessimize the build. Did you performance check if there is a significant difference between -O2
and -O3
? Did you also check this for platforms like arm?
On the same note, our project is building libwally-core for embedded and we would like to use -Os
. But this is explicitly not respected.
I think the motivation to disallow the correct optimizations is invalid. Optimization flags are always given on a project scope and not per library. You anyway can't control if the final binary is compiled with LTO for example.
My feature request is thus: Do not add optimization flags in case CFLAGS is set at configure time. I.e. I would want ./configure CFLAGS="-Os"
to be respected.