From: Ondrej Sury Date: Wed, 22 Nov 2017 20:32:51 +0000 Subject: Change the default optimization from -O3 to -O2 in mysql_release.cmake BUILD_CONFIG profile Forwarded: https://jira.mariadb.org/browse/MDEV-19734?focusedCommentId=156606&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-156606 --- cmake/build_configurations/mysql_release.cmake | 12 ++++++------ .../PerconaFT/cmake_modules/TokuSetupCompiler.cmake | 16 ++++++++-------- 2 files changed, 14 insertions(+), 14 deletions(-) --- a/cmake/build_configurations/mysql_release.cmake +++ b/cmake/build_configurations/mysql_release.cmake @@ -174,12 +174,12 @@ IF(UNIX) IF(CMAKE_COMPILER_IS_GNUCC) SET(COMMON_C_FLAGS "-g -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing -Wno-uninitialized") SET(CMAKE_C_FLAGS_DEBUG "-O ${COMMON_C_FLAGS}") - SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 ${COMMON_C_FLAGS}") + SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 ${COMMON_C_FLAGS}") ENDIF() IF(CMAKE_COMPILER_IS_GNUCXX) SET(COMMON_CXX_FLAGS "-g -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing -Wno-uninitialized") SET(CMAKE_CXX_FLAGS_DEBUG "-O ${COMMON_CXX_FLAGS}") - SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 ${COMMON_CXX_FLAGS}") + SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 ${COMMON_CXX_FLAGS}") ENDIF() # IBM Z flags @@ -228,8 +228,8 @@ IF(UNIX) ENDIF() SET(CMAKE_C_FLAGS_DEBUG "${COMMON_C_FLAGS}") SET(CMAKE_CXX_FLAGS_DEBUG "${COMMON_CXX_FLAGS}") - SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 -unroll2 -ip ${COMMON_C_FLAGS}") - SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 -unroll2 -ip ${COMMON_CXX_FLAGS}") + SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -unroll2 -ip ${COMMON_C_FLAGS}") + SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -unroll2 -ip ${COMMON_CXX_FLAGS}") SET(WITH_SSL no) ENDIF() ENDIF() @@ -238,12 +238,12 @@ IF(UNIX) IF(CMAKE_C_COMPILER_ID MATCHES "Clang") SET(COMMON_C_FLAGS "-g -fno-omit-frame-pointer -fno-strict-aliasing -Wno-parentheses-equality -Wno-string-plus-int") SET(CMAKE_C_FLAGS_DEBUG "${COMMON_C_FLAGS}") - SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 ${COMMON_C_FLAGS}") + SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 ${COMMON_C_FLAGS}") ENDIF() IF(CMAKE_CXX_COMPILER_ID MATCHES "Clang") SET(COMMON_CXX_FLAGS "-g -fno-omit-frame-pointer -fno-strict-aliasing -Wno-parentheses-equality -Wno-string-plus-int") SET(CMAKE_CXX_FLAGS_DEBUG "${COMMON_CXX_FLAGS}") - SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 ${COMMON_CXX_FLAGS}") + SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 ${COMMON_CXX_FLAGS}") ENDIF() # Solaris flags