use _FORTIFY_SOURCE level 3 #2703

This commit is contained in:
nick black 2023-02-07 02:55:55 -05:00
parent 0f64dbb24b
commit 29a5dc2295
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

View File

@ -122,7 +122,7 @@ if(NOT WIN32)
# MSYS2 needs -lssp and -fstack-protector for _FORTIFY_SOURCE # MSYS2 needs -lssp and -fstack-protector for _FORTIFY_SOURCE
# macOS with ASAN can't handle _FORTIFY_SOURCE != 1 # macOS with ASAN can't handle _FORTIFY_SOURCE != 1
if(NOT ${USE_ASAN}) if(NOT ${USE_ASAN})
add_compile_definitions(_FORTIFY_SOURCE=2) add_compile_definitions(_FORTIFY_SOURCE=3)
endif() endif()
add_compile_options(-Wformat -Werror=format-security) add_compile_options(-Wformat -Werror=format-security)
endif() endif()