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()