Only use -Wno-class-memaccess on gcc 8.0 or higher, as it didn't exist previously.

This commit is contained in:
Shanoah Alkire 2018-12-09 02:35:49 -08:00
parent 9c0bbfec1f
commit 0ff7ea3ccc
2 changed files with 21 additions and 7 deletions

View File

@ -18,13 +18,21 @@ set(CommonFlags
-Wstrict-aliasing # Allow to track strict aliasing issue.
-Wno-char-subscripts # only impact svu which is deprecated
-Wno-missing-braces
# Largely turning off because LegacyPluginAPI_Common in Plugins.h spams really badly in gcc 8 due to the memzero initialization.
# Should probably be fixed properly, but for now this should work.
-Wno-class-memaccess
#-Wno-ignored-attributes # don't remember why I put here but it is pure C option, therefore it complains for nothings on cpp files
-DWX_PRECOMP
)
# Largely turning off because LegacyPluginAPI_Common in Plugins.h spams really badly in gcc 8 due to the memzero initialization.
# Should probably be fixed properly, but for now this should work.
if(GCC_VERSION VERSION_EQUAL "8.0" OR GCC_VERSION VERSION_GREATER "8.0")
set(CommonFlags
${CommonFlags}
-Wno-class-memaccess
)
endif()
if ("${PGO}" STREQUAL "generate")
set(pcsx2FinalFlags -fprofile-generate)
elseif("${PGO}" STREQUAL "use")

View File

@ -14,12 +14,18 @@ set(CommonFlags
-Wno-unknown-pragmas
-Wno-parentheses
-Wunused-variable # __dummy variable need to be investigated
# The next two need to be looked at, but spam really badly in gcc 8.
# Largely class alignment in GSDevice.h and memcpy in GSVector*.h.
-Wno-class-memaccess
-Wno-packed-not-aligned
)
# The next two need to be looked at, but spam really badly in gcc 8.
# Largely class alignment in GSDevice.h and memcpy in GSVector*.h.
if(GCC_VERSION VERSION_EQUAL "8.0" OR GCC_VERSION VERSION_GREATER "8.0")
set(CommonFlags
${CommonFlags}
-Wno-class-memaccess
-Wno-packed-not-aligned
)
endif()
if(USE_ICC)
set(CommonFlags "${CommonFlags} -restrict")
endif()