Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Move enablement to global place with condition for Mono components
  • Loading branch information
Koundinya Veluri committed Aug 11, 2021
commit bfc504fb81bc78cb36059d01657c5537a1f4f1be
9 changes: 0 additions & 9 deletions eng/native/configurecet.cmake

This file was deleted.

10 changes: 10 additions & 0 deletions eng/native/configurecompiler.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,16 @@ if (MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /guard:cf")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /guard:cf")

# Enable EH-continuation table and CET-compatibility for native components for amd64 builds except for components of the Mono
# runtime. Added some switches using variables instead of add_compile_options to let individual projects override it.
if (CLR_CMAKE_HOST_ARCH_AMD64 AND NOT CLR_CMAKE_RUNTIME_MONO)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /guard:ehcont")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /guard:ehcont")
set(CMAKE_ASM_MASM_FLAGS "${CMAKE_ASM_MASM_FLAGS} /guard:ehcont")
add_linker_flag(/guard:ehcont)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /CETCOMPAT")
endif (CLR_CMAKE_HOST_ARCH_AMD64)

# Statically linked CRT (libcmt[d].lib, libvcruntime[d].lib and libucrt[d].lib) by default. This is done to avoid
# linking in VCRUNTIME140.DLL for a simplified xcopy experience by reducing the dependency on VC REDIST.
#
Expand Down
1 change: 0 additions & 1 deletion src/coreclr/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ project(CoreCLR)

include(../../eng/native/configurepaths.cmake)
include(${CLR_ENG_NATIVE_DIR}/configurecompiler.cmake)
include(${CLR_ENG_NATIVE_DIR}/configurecet.cmake)

if(MSVC)
set(CMAKE_CXX_STANDARD_LIBRARIES "") # do not link against standard win32 libs i.e. kernel32, uuid, user32, etc.
Expand Down
1 change: 1 addition & 0 deletions src/mono/dlls/dbgshim/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

set(CLR_CMAKE_RUNTIME_MONO 1)
set(CLR_DIR ${PROJECT_SOURCE_DIR}/../../../coreclr)
set(VM_DIR ${PROJECT_SOURCE_DIR}/../../../coreclr/vm)
set(CMAKE_OSX_ARCHITECTURES ${CMAKE_SYSTEM_PROCESSOR})
Expand Down
1 change: 1 addition & 0 deletions src/mono/dlls/mscordbi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

set(CLR_CMAKE_RUNTIME_MONO 1)
set(CLR_DIR ${PROJECT_SOURCE_DIR}/../../../coreclr)
set(VM_DIR ${PROJECT_SOURCE_DIR}/../../../coreclr/vm)
set(CMAKE_OSX_ARCHITECTURES ${CMAKE_SYSTEM_PROCESSOR})
Expand Down
1 change: 0 additions & 1 deletion src/native/corehost/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ project(corehost)

include(../../../eng/native/configurepaths.cmake)
include(${CLR_ENG_NATIVE_DIR}/configurecompiler.cmake)
include(${CLR_ENG_NATIVE_DIR}/configurecet.cmake)

if (MSVC)
add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:/wd4996>)
Expand Down
1 change: 0 additions & 1 deletion src/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ project(Tests)

include(../../eng/native/configurepaths.cmake)
include(${CLR_ENG_NATIVE_DIR}/configurecompiler.cmake)
include(${CLR_ENG_NATIVE_DIR}/configurecet.cmake)

# Add this subdir. We install the headers for the jit.
add_subdirectory(../coreclr/pal/prebuilt/inc ../coreclr/pal/prebuilt/inc)
Expand Down