Skip to content

Commit

Permalink
fix: disable -ffast-math on x86 arch (#5051)
Browse files Browse the repository at this point in the history
  • Loading branch information
zchrissirhcz committed Sep 25, 2023
1 parent 69d6051 commit 3361266
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,10 @@ else()
if(NOT CMAKE_SYSTEM_NAME STREQUAL "Emscripten" AND NOT (CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.6))
target_compile_options(ncnn PRIVATE -Ofast)
endif()

target_compile_options(ncnn PRIVATE -ffast-math)

if(NOT(NCNN_TARGET_ARCH STREQUAL "x86"))
target_compile_options(ncnn PRIVATE -ffast-math)
endif()
endif()

# target_compile_options(ncnn PRIVATE -march=native)
Expand Down

0 comments on commit 3361266

Please sign in to comment.