From ec4a69105c47ea831e818abad269585b5fd395c1 Mon Sep 17 00:00:00 2001 From: Alexey Sotkin Date: Fri, 5 Jul 2019 19:03:36 +0300 Subject: [PATCH] Enable compiler generation of CFG security checks --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index bef97ffd..78c925d2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -55,6 +55,11 @@ include(TableGen) find_package(Git REQUIRED) +# Enable compiler generation of Control Flow Guard security checks. +if (WIN32) + add_compile_options(/guard:cf /DYNAMICBASE) +endif() + if (NOT WIN32) add_subdirectory( linux_linker ) endif()