Skip to content

Commit 3ff5965

Browse files
committed
[Build] Disable potentially dangerous floating point optimizations
1 parent 99bb82f commit 3ff5965

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

premake5.lua

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,15 @@ filter("configurations:Release")
8181
})
8282
optimize("Speed")
8383
inlining("Auto")
84-
floatingpoint("Fast")
8584
flags({
8685
"LinkTimeOptimization",
8786
})
87+
-- Not using floatingpoint("Fast") - NaN checks are used in some places
88+
-- (though rarely), overall preferable to avoid any functional differences
89+
-- between debug and release builds, and to have calculations involved in GPU
90+
-- (especially anything that may affect vertex position invariance) and CPU
91+
-- (such as constant propagation) emulation as predictable as possible,
92+
-- including handling of specials since games make assumptions about them.
8893
filter("platforms:Linux")
8994
system("linux")
9095
toolset("clang")

0 commit comments

Comments
 (0)