From 7be97313477d58b1ebb295f8832f84cf0a2c072d Mon Sep 17 00:00:00 2001 From: Lubos Date: Fri, 25 Mar 2022 15:56:05 +0100 Subject: [PATCH] Fast math flag replacement --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 5ebef3c0..76b823d2 100644 --- a/Makefile +++ b/Makefile @@ -442,8 +442,11 @@ ifeq ($(PLATFORM),android) -fno-builtin-cos -fno-builtin-sin -fPIC -DARCH_STRING=\\\"$(ARCH)\\\" CLIENT_CFLAGS += $(SDL_CFLAGS) -DSDL_DISABLE_IMMINTRIN_H -fno-builtin-cos -fno-builtin-sin + # Flag -ffast-math replacement: https://pspdfkit.com/blog/2021/understanding-fast-math/ + # Flags -ffp-contract=fast -fno-trapping-math are unused because they are causing lightmap issues + OPTIMIZEFASTMATH = -ffinite-math-only -fno-math-errno -fassociative-math -freciprocal-math -fno-signed-zeros OPTIMIZEVM = -O3 -funroll-loops -fomit-frame-pointer - OPTIMIZE = $(OPTIMIZEVM) + OPTIMIZE = $(OPTIMIZEVM) $(OPTIMIZEFASTMATH) HAVE_VM_COMPILED = false