build: Disable _FORTIFY_SOURCE on Debug builds. (#7348)
This commit is contained in:
parent
da9f382d2c
commit
30c53c9509
|
@ -110,12 +110,16 @@ else()
|
||||||
# In case a flag isn't supported on e.g. a certain architecture, don't error.
|
# In case a flag isn't supported on e.g. a certain architecture, don't error.
|
||||||
-Wno-unused-command-line-argument
|
-Wno-unused-command-line-argument
|
||||||
# Build fortification options
|
# Build fortification options
|
||||||
-Wp,-D_FORTIFY_SOURCE=2
|
|
||||||
-Wp,-D_GLIBCXX_ASSERTIONS
|
-Wp,-D_GLIBCXX_ASSERTIONS
|
||||||
-fstack-protector-strong
|
-fstack-protector-strong
|
||||||
-fstack-clash-protection
|
-fstack-clash-protection
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (NOT CMAKE_BUILD_TYPE STREQUAL Debug)
|
||||||
|
# _FORTIFY_SOURCE can't be used without optimizations.
|
||||||
|
add_compile_options(-Wp,-D_FORTIFY_SOURCE=2)
|
||||||
|
endif()
|
||||||
|
|
||||||
if (CITRA_WARNINGS_AS_ERRORS)
|
if (CITRA_WARNINGS_AS_ERRORS)
|
||||||
add_compile_options(-Werror)
|
add_compile_options(-Werror)
|
||||||
endif()
|
endif()
|
||||||
|
|
Reference in New Issue