Adjust cURL compile options

- Disable function inlining entirely, this allows for much easier hooking between engine and SDK code (the compiled code is now identical between engine and SDK, except that the SDK has all relevant security problems patched as per https://curl.se/docs/vuln-7.54.0.html).
- Enable buffer security checks to avoid potential remote attacks.
This commit is contained in:
Kawe Mazidjatari 2023-06-17 01:07:07 +02:00
parent 3f8baf6f68
commit 788f38b428

View File

@ -1,5 +1,5 @@
cmake_minimum_required( VERSION 3.16 )
add_module( "lib" "libcurl" "" ${FOLDER_CONTEXT} TRUE TRUE )
add_module( "lib" "libcurl" "" ${FOLDER_CONTEXT} TRUE FALSE )
start_sources()
@ -279,6 +279,11 @@ target_compile_definitions( ${PROJECT_NAME} PRIVATE
ENABLE_IPV6
)
target_compile_options( ${PROJECT_NAME} PRIVATE
$<$<AND:$<CXX_COMPILER_ID:MSVC>,$<CONFIG:Release>>:/Ob0>
$<$<AND:$<CXX_COMPILER_ID:MSVC>,$<CONFIG:Release>>:/GS>
)
target_include_directories( ${PROJECT_NAME} PRIVATE
"${ENGINE_SOURCE_DIR}/thirdparty/curl/"
"${ENGINE_SOURCE_DIR}/thirdparty/curl/include/"