Skip to content

Commit

Permalink
Enable compiler generation of CFG security checks
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexeySotkin committed Jul 30, 2019
1 parent dfd0a1e commit 38a1ba4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,11 @@ if (WIN32)
"RC_PRODUCT_NAME=\"${RC_PRODUCT_NAME}\""
"RC_PRODUCT_VERSION=\"${RC_FILE_VERSION}\""
"RC_COPYRIGHT=\"Copyright ${RC_CHAR_C} 2018 Intel Corporation. All rights reserved.\"")
# Enable compiler generation of Control Flow Guard security checks.
target_compile_options(${TARGET_NAME} PUBLIC "/guard:cf")
set_property(TARGET ${TARGET_NAME} APPEND_STRING PROPERTY
LINK_FLAGS "/DYNAMICBASE /GUARD:CF")

elseif(UNIX)
set_property(TARGET ${TARGET_NAME} APPEND_STRING PROPERTY
COMPILE_DEFINITIONS LIBCOMMON_CLANG_NAME="$<TARGET_SONAME_FILE_NAME:${TARGET_NAME}>")
Expand Down

0 comments on commit 38a1ba4

Please sign in to comment.