SWIFTSIM / SWIFT

Modern astrophysics and cosmology particle-based code. Mirror of gitlab developments at https://gitlab.cosma.dur.ac.uk/swift/swiftsim
http://www.swiftsim.com
GNU Lesser General Public License v3.0
88 stars 58 forks source link

Configuring with --enable-debug does not turn off optimisation #20

Closed tancak closed 3 years ago

tancak commented 3 years ago

I configured swift with the --enable-debug flag when running swift it says that it was compiled with the following CFLAGS CFLAGS : '-g -O0 -O3 -fomit-frame-pointer -fstrict-aliasing -ffast-math -funroll-loops -mcpu=native -fno-vectorize -fno-slp-vectorize -pthread -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free -Wall -Wextra -Wno-unused-parameter -Wshadow -Werror -Wstrict-prototypes' and the -O0 from the --enable-debug flag is overwritten.

bwvdnbro commented 3 years ago

This is intentional, since --enable-debug is only meant to turn on debugging info. If you want to disable optimisations as well, you also have to use --disable-optimization when configuring.