NWNX / nwnx2-linux

Neverwinter Nights Extender 2 - Linux version
http://www.nwnx.org/phpBB2/
Other
43 stars 27 forks source link

make -O2 default on Release builds and force -O0 for all current code #97

Closed niv closed 8 years ago

niv commented 8 years ago

This commit makes -O2 the default on release and relwithdebinfo builds, then forces -O0 on nwnx2 and all in-tree plugin cmakelists.

My proposed way forward is:

This also adds -DNDEBUG which was missing from the last patch, and adds some awesome gdb-related debug flags to DEBUG builds so you get full symbols in gdb.

please discuss!

virusman commented 8 years ago

Does any plugin compile with -O2 right now?

niv commented 8 years ago

Theoretically speaking, all of them should, except those still using old-style inline assembly (like events, profiler, etc). I have tested a few on my server and things seemed fine, but I wanted to queue them up formally in PRs to have it all documented.

The core, nwnx2lib.cpp, needs a rewrite. I have that queued up as well but it's not finished yet.

virusman commented 8 years ago

Thanks!