mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2024-11-22 17:39:53 +03:00
Enable Control flow guard and Qspectre protection for windows binaries
found by BinSkim
This commit is contained in:
parent
d0fe38384c
commit
5adeeb75ea
@ -60,6 +60,18 @@ include_directories(.)
|
|||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
add_definitions(-DWIN32 -D_WINDOWS -DOS_WIN32 -D_CRT_SECURE_NO_WARNINGS)
|
add_definitions(-DWIN32 -D_WINDOWS -DOS_WIN32 -D_CRT_SECURE_NO_WARNINGS)
|
||||||
|
|
||||||
|
#
|
||||||
|
# https://msrc-blog.microsoft.com/2020/08/17/control-flow-guard-for-clang-llvm-and-rust/
|
||||||
|
#
|
||||||
|
|
||||||
|
message("Setting CONTROL FLOW GUARD")
|
||||||
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /guard:cf")
|
||||||
|
set(CMAKE_EXE_LINKER_FLAGS "/guard:cf /DYNAMICBASE")
|
||||||
|
|
||||||
|
message("Setting QSPECTRE")
|
||||||
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Qspectre")
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(UNIX)
|
if(UNIX)
|
||||||
|
Loading…
Reference in New Issue
Block a user