]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Use less aggressive optimisation level
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 5 Mar 2019 22:51:29 +0000 (22:51 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 5 Mar 2019 22:51:29 +0000 (22:51 +0000)
CMakeLists.txt
contrib/aho-corasick/CMakeLists.txt
contrib/hiredis/CMakeLists.txt
contrib/http-parser/CMakeLists.txt
contrib/lc-btrie/CMakeLists.txt
contrib/libottery/CMakeLists.txt
contrib/linenoise/CMakeLists.txt
contrib/lua-lpeg/CMakeLists.txt
contrib/t1ha/CMakeLists.txt
contrib/xxhash/CMakeLists.txt
contrib/zstd/CMakeLists.txt

index 7ab6f7c5657d6afc827ed6cdbdff94bf060acb0f..2e490b6cca16cc37ace40827fd54d06ba3a7d1a5 100644 (file)
@@ -819,7 +819,7 @@ IF(NOT CMAKE_C_OPT_FLAGS)
                        MARK_AS_ADVANCED(CMAKE_GCC_AR CMAKE_GCC_RANLIB)
                ENDIF()
                IF(CMAKE_GCC_AR AND CMAKE_GCC_RANLIB)
-                       SET(CMAKE_C_OPT_FLAGS "-g -O3 -fstrict-aliasing -flto")
+                       SET(CMAKE_C_OPT_FLAGS "-g -O2 -fstrict-aliasing -flto")
                        SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -flto")
                        SET(CMAKE_C_ARCHIVE_CREATE "${CMAKE_GCC_AR} cr <TARGET> <LINK_FLAGS> <OBJECTS>")
                        SET(CMAKE_C_ARCHIVE_APPEND "${CMAKE_GCC_AR} r <TARGET> <LINK_FLAGS> <OBJECTS>")
@@ -829,7 +829,7 @@ IF(NOT CMAKE_C_OPT_FLAGS)
                        SET(CMAKE_CXX_ARCHIVE_FINISH "${CMAKE_GCC_RANLIB} <TARGET>")
                ENDIF()
        ELSE()
-               SET(CMAKE_C_OPT_FLAGS "-g -O3 -fstrict-aliasing")
+               SET(CMAKE_C_OPT_FLAGS "-g -O2 -fstrict-aliasing")
        ENDIF()
        ELSE(ENABLE_OPTIMIZATION MATCHES "ON")
                IF(ENABLE_FULL_DEBUG MATCHES "ON")
index 93c51a14615731449375c0c6eb7d250983b7780e..fb0e70bbc4836c47c68c2317bfb8a9526f3cf496 100644 (file)
@@ -3,7 +3,7 @@ SET(AHOCORASICSRC       acism_create.c
 
 IF(ENABLE_FULL_DEBUG MATCHES "OFF")
 if ("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
-       SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3")
+       SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2")
 endif ()
 ENDIF()
 
index f8b233996eb220dcc501010f5f79253e8ae716f6..7648c0dcc2f8d47743058d531a53310e50808ecc 100644 (file)
@@ -9,7 +9,7 @@ SET(HIREDIS_CFLAGS "")
 
 IF(ENABLE_FULL_DEBUG MATCHES "OFF")
 IF("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
-       SET(HIREDIS_CFLAGS "${HIREDIS_CFLAGS} -O3")
+       SET(HIREDIS_CFLAGS "${HIREDIS_CFLAGS} -O2")
 ENDIF()
 ENDIF()
 
index 499c85e932175600368c89e4c48f2be393b731a4..cb6767272080a6c9c44e9acd2929b55c39428871 100644 (file)
@@ -4,7 +4,7 @@ SET(HTTPSRC            http_parser.c)
 SET(HTTP_COMPILE_FLAGS "-DRSPAMD_LIB")
 IF(ENABLE_FULL_DEBUG MATCHES "OFF")
 if ("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
-       set(HTTP_COMPILE_FLAGS "${HTTP_COMPILE_FLAGS} -O3")
+       set(HTTP_COMPILE_FLAGS "${HTTP_COMPILE_FLAGS} -O2")
 endif ()
 ENDIF()
 
index b520bda862540edc7028e6806e1fb5cf80c1b1e9..3b7a1cf2464194f768637098da6a602aee07da27 100644 (file)
@@ -4,7 +4,7 @@ ADD_LIBRARY(lcbtrie STATIC ${LCTRIESRC})
 SET(LCTRIE_CFLAGS "-DBUILD_RSPAMD")
 IF(ENABLE_FULL_DEBUG MATCHES "OFF")
 if ("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
-    SET(LCTRIE_CFLAGS "${LCTRIE_CFLAGS} -O3")
+    SET(LCTRIE_CFLAGS "${LCTRIE_CFLAGS} -O2")
 endif ()
 ENDIF()
 
index 4a6ee31db50544a118ab9168555402704571e801..8a23853079bda2f874c62d2c2c5f8b8a0d072fe7 100644 (file)
@@ -10,7 +10,7 @@ ADD_LIBRARY(ottery STATIC ${OTTERYSRC})
 SET(OTTERY_CFLAGS "-DBUILD_RSPAMD -DOTTERY_NO_PID_CHECK -DOTTERY_NO_INIT_CHECK")
 IF(ENABLE_FULL_DEBUG MATCHES "OFF")
 if ("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
-    SET(OTTERY_CFLAGS "${OTTERY_CFLAGS} -O3")
+    SET(OTTERY_CFLAGS "${OTTERY_CFLAGS} -O2")
 endif ()
 ENDIF()
 set_target_properties(ottery PROPERTIES COMPILE_FLAGS "${OTTERY_CFLAGS}")
\ No newline at end of file
index 8fc9ff843d2a50c8195db6aa88d6360835e8acbf..93279f0b95f95f0ad9cf9134e4f3664370f391bd 100644 (file)
@@ -5,6 +5,6 @@ SET_TARGET_PROPERTIES(rspamd-linenoise PROPERTIES VERSION ${RSPAMD_VERSION})
 
 IF(ENABLE_FULL_DEBUG MATCHES "OFF")
 if ("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
-       SET_TARGET_PROPERTIES(rspamd-linenoise PROPERTIES COMPILE_FLAGS "-O3")
+       SET_TARGET_PROPERTIES(rspamd-linenoise PROPERTIES COMPILE_FLAGS "-O2")
 endif ()
 ENDIF()
index 2362aac9cd5e69ccb6e71d5f3a099ee584c2a21d..e8b3379359ad628c4126c0763ad3fa520954c688 100644 (file)
@@ -6,7 +6,7 @@ SET(LPEGSRC lpcap.c
 
 IF(ENABLE_FULL_DEBUG MATCHES "OFF")
 if ("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
-    SET(LPEG_CFLAGS "${LPEG_CFLAGS} -O3")
+    SET(LPEG_CFLAGS "${LPEG_CFLAGS} -O2")
 endif ()
 ENDIF()
 
index 491010ff959b0697aee65c5069da7005c69ec817..626dda509abc452d2cdae500eb05ed57b58a523b 100644 (file)
@@ -7,6 +7,6 @@ ADD_DEFINITIONS("-DT1HA_USE_FAST_ONESHOT_READ=0")
 
 IF(ENABLE_FULL_DEBUG MATCHES "OFF")
     if ("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
-        SET_TARGET_PROPERTIES(rspamd-t1ha PROPERTIES COMPILE_FLAGS "-O3")
+        SET_TARGET_PROPERTIES(rspamd-t1ha PROPERTIES COMPILE_FLAGS "-O2")
     endif ()
 ENDIF()
index 8caf319e4f604c6cd9327f0f4565184bc87d5fc7..b4feec1d6185b58141139cd8f20c7d5aee2860bd 100644 (file)
@@ -4,6 +4,6 @@ ADD_LIBRARY(xxhash STATIC ${XXHASHSRC})
 
 IF(ENABLE_FULL_DEBUG MATCHES "OFF")
 if ("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
-       SET_TARGET_PROPERTIES(xxhash PROPERTIES COMPILE_FLAGS "-O3")
+       SET_TARGET_PROPERTIES(xxhash PROPERTIES COMPILE_FLAGS "-O2")
 endif ()
 ENDIF()
index 2cccee0c170b0cb31fc67a1196c9448967e057d0..cda9b66d61d4565367cc668cb795ffa81d42eab8 100644 (file)
@@ -25,6 +25,6 @@ ADD_DEFINITIONS(-DZSTD_STATIC_LINKING_ONLY)
 
 IF(ENABLE_FULL_DEBUG MATCHES "OFF")
 if ("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
-       SET_TARGET_PROPERTIES(rspamd-zstd PROPERTIES COMPILE_FLAGS "-O3")
+       SET_TARGET_PROPERTIES(rspamd-zstd PROPERTIES COMPILE_FLAGS "-O2")
 endif ()
 ENDIF()