Merge pull request #38 from lvonasek/feature_fast_math

Fast math flag replacement
This commit is contained in:
Simon 2022-03-29 22:43:58 +01:00 committed by GitHub
commit a62ae5e4b2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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