-O3 improves performance, but negate -ffast-math

This commit is contained in:
Menche 2016-07-09 17:07:06 -07:00
parent f823443087
commit 9d707c3493
1 changed files with 3 additions and 3 deletions

View File

@ -373,9 +373,9 @@ else()
set(ARCH x86_64)
endif()
set(SAFETY_FLAGS "-fwrapv")
set(SAFETY_FLAGS "-fwrapv -fno-fast-math")
set(SAFETY_LDFLAGS "-Wl,-z,relro,-z,now")
set(OPT_FLAGS "-O2 -fomit-frame-pointer")
set(OPT_FLAGS "-O3 -fomit-frame-pointer")
set(OPT_LDFLAGS "-Wl,-O1,--sort-common,-s")
if(ENABLE_SSP)
@ -405,7 +405,7 @@ else()
set(CMAKE_CXX_FLAGS_RELEASE "${OPT_FLAGS} ${SAFETY_FLAGS} -Wall -DNDEBUG -pipe")
set(CMAKE_C_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE})
set(CMAKE_CXX_FLAGS_DEBUG "${SAFETY_FLAGS} -Wall -O0 -g2 -ggdb")
set(CMAKE_CXX_FLAGS_DEBUG "${SAFETY_FLAGS} -Wall -O0 -g3 -ggdb")
set(CMAKE_C_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG})
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${OPT_LDFLAGS} ${SAFETY_LDFLAGS}")