mirror of
https://github.com/godotengine/godot.git
synced 2025-01-08 11:11:55 +00:00
Merge pull request #10776 from hpvb/fix-10758
Disable -ffast-math for etc2comp
This commit is contained in:
commit
e59b1212da
@ -35,3 +35,7 @@ env_etc.add_source_files(env.modules_sources, "*.cpp")
|
||||
|
||||
# upstream uses c++11
|
||||
env_etc.Append(CXXFLAGS="-std=gnu++11")
|
||||
# -ffast-math seems to be incompatible with ec2comp on recent versions of
|
||||
# GCC and Clang
|
||||
if '-ffast-math' in env_etc['CCFLAGS']:
|
||||
env_etc['CCFLAGS'].remove('-ffast-math')
|
||||
|
@ -74,7 +74,9 @@ def configure(env):
|
||||
## Build type
|
||||
|
||||
if (env["target"] == "release"):
|
||||
env.Prepend(CCFLAGS=['-Ofast'])
|
||||
# -O3 -ffast-math is identical to -Ofast. We need to split it out so we can selectively disable
|
||||
# -ffast-math in code for which it generates wrong results.
|
||||
env.Prepend(CCFLAGS=['-O3', '-ffast-math'])
|
||||
if (env["debug_release"] == "yes"):
|
||||
env.Prepend(CCFLAGS=['-g2'])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user