general: make -fwrapv generic to all architectures (#11379)

This commit is contained in:
liamwhite 2023-09-02 14:41:21 -04:00 committed by GitHub
parent 89a2d48cf8
commit 32b2436f80
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -105,6 +105,8 @@ if (MSVC)
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "/DEBUG /MANIFEST:NO /INCREMENTAL:NO /OPT:REF,ICF" CACHE STRING "" FORCE) set(CMAKE_EXE_LINKER_FLAGS_RELEASE "/DEBUG /MANIFEST:NO /INCREMENTAL:NO /OPT:REF,ICF" CACHE STRING "" FORCE)
else() else()
add_compile_options( add_compile_options(
-fwrapv
-Werror=all -Werror=all
-Werror=extra -Werror=extra
-Werror=missing-declarations -Werror=missing-declarations
@ -129,7 +131,6 @@ else()
if (ARCHITECTURE_x86_64) if (ARCHITECTURE_x86_64)
add_compile_options("-mcx16") add_compile_options("-mcx16")
add_compile_options("-fwrapv")
endif() endif()
if (APPLE AND CMAKE_CXX_COMPILER_ID STREQUAL Clang) if (APPLE AND CMAKE_CXX_COMPILER_ID STREQUAL Clang)