From 3e22acff6ca6499d23c6baa73a4126e907a15436 Mon Sep 17 00:00:00 2001 From: lateralusX Date: Fri, 20 Mar 2020 13:18:00 +0100 Subject: [PATCH] Remove Mono runtime vcruntime140.dll release build dependency. CoreCLR static link vcruntime140.dll, but dynamic link rest of C-runtime using ucrt.lib in release build. Commit align Mono runtime to follow same pattern, removing dependency on vcruntime140.dll. --- src/mono/mono.proj | 2 +- src/mono/msvc/mono.props | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/mono/mono.proj b/src/mono/mono.proj index d52d8dc3e4e7ad..4736fca176e72c 100644 --- a/src/mono/mono.proj +++ b/src/mono/mono.proj @@ -370,7 +370,7 @@ <_MonoBuildParams Include="/p:MONO_BUILD_DIR_PREFIX=""$(MonoObjDir)""" /> <_MonoBuildParams Include="/p:MONO_ENABLE_NETCORE=true" /> - <_MonoBuildParams Condition="'$(Configuration)' == 'Debug'" Include="/p:MONO_USE_STATIC_C_RUNTIME=true" /> + <_MonoBuildParams Include="/p:MONO_USE_STATIC_C_RUNTIME=true" /> <_MonoBuildParams Include="/p:CL_MPCount=$([System.Environment]::ProcessorCount)" /> <_MonoBuildParams Include="/v:minimal" /> <_MonoBuildParams Condition="$(MonoEnableLLVM) == true" Include="/p:MONO_ENABLE_LLVM=true" /> diff --git a/src/mono/msvc/mono.props b/src/mono/msvc/mono.props index 7fc8a626ec6f4d..e71f2cc330d6db 100644 --- a/src/mono/msvc/mono.props +++ b/src/mono/msvc/mono.props @@ -47,22 +47,22 @@ 610 $(MONO_DIR)/external/llvm-project/llvm/include - + MultiThreadedDebug MultiThreaded - + MultiThreadedDebugDLL MultiThreadedDLL - + HAVE_SGEN_GC;HAVE_MOVING_COLLECTOR;HAVE_WRITE_BARRIERS;HAVE_CONC_GC_AS_DEFAULT $(SGEN_DEFINES) libgcmonosgen.lib -sgen $(MONO_BUILD_DIR_PREFIX)sgen/ - + HAVE_BOEHM_GC $(BOEHM_DEFINES) libgc.lib @@ -74,10 +74,10 @@ libmono-static$(MONO_TARGET_SUFFIX).lib mono-2.0$(MONO_TARGET_SUFFIX).lib - + $(MONO_STATIC_LIBMONO_LIB) - + eglib.lib;$(MONO_DYNAMIC_LIBMONO_LIB) @@ -136,6 +136,8 @@ bcrypt.lib;Mswsock.lib;ws2_32.lib;ole32.lib;oleaut32.lib;psapi.lib;version.lib;advapi32.lib;winmm.lib;kernel32.lib;%(AdditionalDependencies) $(MONO_BUILD_DIR_PREFIX)$(Platform)/lib/$(Configuration) + + /NODEFAULTLIB:libucrt.lib /DEFAULTLIB:ucrt.lib %(AdditionalOptions) $(MONO_BUILD_DIR_PREFIX)$(Platform)/lib/$(Configuration)