]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
build: enable strict aliasing optimisations
authorbones_was_here <bones_was_here@xonotic.au>
Fri, 8 Dec 2023 07:08:44 +0000 (17:08 +1000)
committerbones_was_here <bones_was_here@xonotic.au>
Sat, 9 Dec 2023 10:13:35 +0000 (20:13 +1000)
Extensive code quality improvements have been made since this was last
tried, and compilers are smarter with better warnings now.

This doesn't change the Xonotic pipeline gameplay hash so it's highly
unlikely to cause any subtle regressions.

Signed-off-by: bones_was_here <bones_was_here@xonotic.au>
makefile.inc

index ff2a68df9d94265e73560fc46e1155b77cfaba27..d68421fe009315bf00085899a8cdcf2bfcc696d9 100644 (file)
@@ -201,7 +201,8 @@ OPTIM_DEBUG=$(CPUOPTIMIZATIONS)
 #OPTIM_RELEASE=-O2 -fno-strict-aliasing -funroll-loops $(CPUOPTIMIZATIONS)
 #OPTIM_RELEASE=-O2 -fno-strict-aliasing $(CPUOPTIMIZATIONS)
 #OPTIM_RELEASE=-O3 -fno-strict-aliasing $(CPUOPTIMIZATIONS)
-OPTIM_RELEASE=-O3 -fno-strict-aliasing -fno-math-errno -fno-trapping-math $(CPUOPTIMIZATIONS)
+#OPTIM_RELEASE=-O3 -fno-strict-aliasing -fno-math-errno -fno-trapping-math $(CPUOPTIMIZATIONS)
+OPTIM_RELEASE=-O3 -fno-math-errno -fno-trapping-math $(CPUOPTIMIZATIONS)
 # NOTE: *never* *ever* use the -ffast-math or -funsafe-math-optimizations flag
 # Also, since gcc 5, -ffinite-math-only makes NaN and zero compare equal inside engine code but not inside QC, which causes error spam for seemingly valid QC code like if (x != 0) return 1 / x;