Fix T39646: Rigid Body Constraints non functional on release builds

-ffast-math is evil, not sure why it was enabled...
I seems to work better on OSX but it's still not a good idea.

The SConscript for bullet is a mess, I don't understand why
we use different flags for different platforms in the first place.
Seems to be a historical artifact but I don't know enough about scons
to try and clean it up.
This commit is contained in:
Sergej Reich 2014-04-09 01:22:54 +02:00
parent 2496636a65
commit 6ffabfae85
2 changed files with 1 additions and 5 deletions

@ -404,10 +404,6 @@ if(CMAKE_COMPILER_IS_GNUCXX)
endif()
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_C_COMPILER_ID MATCHES "Clang")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -ffast-math")
endif()
# Tentative fix for bullet misbehavior (T38746), needs further clarification what flags conflict here
if(APPLE AND CMAKE_C_COMPILER_ID MATCHES "Clang" AND NOT ${CMAKE_C_COMPILER_VERSION} VERSION_LESS '3.4')
SET_SOURCE_FILES_PROPERTIES(src/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.cpp COMPILE_FLAGS "-O0")

@ -19,7 +19,7 @@ elif env['OURPLATFORM'] in ('linux', 'freebsd4', 'freebsd5'):
cflags += ['-O2']
elif sys.platform=='darwin':
defs += ' NDEBUG'
bt_flags = env['CCFLAGS'] + ['-fPIC', '-msse','-msse2', '-msse3', '-mssse3', '-ffast-math'] # basic -O0 optimization
bt_flags = env['CCFLAGS'] + ['-fPIC', '-msse','-msse2', '-msse3', '-mssse3'] # basic -O0 optimization
bt_opt_flags = bt_flags + ['-O3']
bullet2_src = env.Glob("LinearMath/*.cpp")