Skip to content

Commit

Permalink
Don't use -Ofast flag
Browse files Browse the repository at this point in the history
clang will deprecate it soon
  • Loading branch information
SChernykh committed Jul 28, 2024
1 parent eb490d8 commit ebb6fe6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cmake/flags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ if (CMAKE_CXX_COMPILER_ID MATCHES GNU)
if (DEV_WITH_TSAN OR DEV_WITH_UBSAN OR DEV_WITH_ASAN)
set(OPTIMIZATION_FLAGS "-Og -g")
else()
set(OPTIMIZATION_FLAGS "-Ofast -s")
set(OPTIMIZATION_FLAGS "-O3 -ffast-math -s")
endif()

if (WITH_LTO)
Expand Down Expand Up @@ -102,7 +102,7 @@ elseif (CMAKE_CXX_COMPILER_ID MATCHES Clang)
if (DEV_WITH_MSAN)
set(OPTIMIZATION_FLAGS "-Og -g")
else()
set(OPTIMIZATION_FLAGS "-Ofast -funroll-loops -fmerge-all-constants")
set(OPTIMIZATION_FLAGS "-O3 -ffast-math -funroll-loops -fmerge-all-constants")
endif()

if (WITH_LTO)
Expand Down
4 changes: 2 additions & 2 deletions tests/cmake/flags.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
if (CMAKE_CXX_COMPILER_ID MATCHES GNU)
set(GENERAL_FLAGS "-pthread")
set(WARNING_FLAGS "-Wall -Wextra")
set(OPTIMIZATION_FLAGS "-Ofast -s")
set(OPTIMIZATION_FLAGS "-O3 -ffast-math -s")

if (WITH_LTO)
set(OPTIMIZATION_FLAGS "${OPTIMIZATION_FLAGS} -flto=auto -fuse-linker-plugin")
Expand Down Expand Up @@ -45,7 +45,7 @@ elseif (CMAKE_CXX_COMPILER_ID MATCHES Clang)
endif()

set(WARNING_FLAGS "-Wall -Wextra -Wno-undefined-internal")
set(OPTIMIZATION_FLAGS "-Ofast -funroll-loops -fmerge-all-constants")
set(OPTIMIZATION_FLAGS "-O3 -ffast-math -funroll-loops -fmerge-all-constants")

if (WITH_LTO)
set(OPTIMIZATION_FLAGS "${OPTIMIZATION_FLAGS} -flto")
Expand Down

0 comments on commit ebb6fe6

Please sign in to comment.