mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-10-31 15:20:10 +00:00
Codechange: Only apply FORTIFY_SOURCE in non-debug builds
It requires -O1 (or greater) and GCC spews out warnings if you try using it with -O0
This commit is contained in:
parent
e5f931ef42
commit
887b912af1
@ -31,7 +31,7 @@ macro(compile_flags)
|
||||
# it does not appear to support the $<> tags.
|
||||
add_compile_options(
|
||||
"$<$<CONFIG:Debug>:-D_DEBUG>"
|
||||
"$<$<CONFIG:Debug>:-D_FORTIFY_SOURCE=2>"
|
||||
"$<$<NOT:$<CONFIG:Debug>>:-D_FORTIFY_SOURCE=2>" # FORTIFY_SOURCE should only be used in non-debug builds (requires -O1+)
|
||||
)
|
||||
|
||||
# Prepare a generator that checks if we are not a debug, and don't have asserts
|
||||
|
Loading…
Reference in New Issue
Block a user