diff options
author | Gaurav Khanna (CLR) <gaurav.khanna@microsoft.com> | 2016-02-03 15:26:04 -0800 |
---|---|---|
committer | Gaurav Khanna (CLR) <gaurav.khanna@microsoft.com> | 2016-02-03 15:29:17 -0800 |
commit | 10b1866801537e6bd51fb08feb4b786a54c48254 (patch) | |
tree | 6423aa6988e80e702cde24ec224423711338f876 /CMakeLists.txt | |
parent | 178775c78e877ce128cd6bef62a716141424ac32 (diff) | |
download | coreclr-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.txt | 7 |
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 |