summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorGaurav Khanna (CLR) <gaurav.khanna@microsoft.com>2016-02-03 15:26:04 -0800
committerGaurav Khanna (CLR) <gaurav.khanna@microsoft.com>2016-02-03 15:29:17 -0800
commit10b1866801537e6bd51fb08feb4b786a54c48254 (patch)
tree6423aa6988e80e702cde24ec224423711338f876 /CMakeLists.txt
parent178775c78e877ce128cd6bef62a716141424ac32 (diff)
downloadcoreclr-10b1866801537e6bd51fb08feb4b786a54c48254.tar.gz
coreclr-10b1866801537e6bd51fb08feb4b786a54c48254.tar.bz2
coreclr-10b1866801537e6bd51fb08feb4b786a54c48254.zip
Initial support for CFG. This makes VS 2015 as the minimum required build toolset, on Windows, for the repo.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1859ac2083..8d0aee8dd9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -430,6 +430,13 @@ if (WIN32)
add_compile_options($<$<CONFIG:Debug>:/homeparams>) # Force parameters passed in registers to be written to the stack
endif (CLR_CMAKE_PLATFORM_ARCH_AMD64)
+ if(NOT CLR_CMAKE_PLATFORM_ARCH_ARM64)
+ # enable control-flow-guard support for native components for non-Arm64 builds
+ add_compile_options(/guard:cf)
+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /guard:cf")
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /guard:cf")
+ endif (NOT CLR_CMAKE_PLATFORM_ARCH_ARM64)
+
# Linker flags
#
# Disable the following line for UNIX altjit on Windows