From 06db0e5dc54168d332a0c31c8b6e77332b12b543 Mon Sep 17 00:00:00 2001 From: NN <580536+NN---@users.noreply.github.com> Date: Wed, 29 Dec 2021 19:19:13 +0200 Subject: [PATCH 1/2] Delay load winrt --- src/native/corehost/apphost/static/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/native/corehost/apphost/static/CMakeLists.txt b/src/native/corehost/apphost/static/CMakeLists.txt index 0d9ae541c33b1d..0216ed1f09a076 100644 --- a/src/native/corehost/apphost/static/CMakeLists.txt +++ b/src/native/corehost/apphost/static/CMakeLists.txt @@ -110,6 +110,9 @@ if(CLR_CMAKE_TARGET_WIN32) # Incremental linking results in the linker inserting extra padding and routing function calls via thunks that can break the # invariants (e.g. size of region between Jit_PatchedCodeLast-Jit_PatchCodeStart needs to fit in a page). add_linker_flag("/INCREMENTAL:NO") + + # Delay load libraries required for WinRT as that is not supported on all platforms + add_linker_flag("/DELAYLOAD:api-ms-win-core-winrt-l1-1-0.dll") endif() if(CLR_CMAKE_TARGET_WIN32) @@ -130,6 +133,7 @@ if(CLR_CMAKE_TARGET_WIN32) shell32.lib bcrypt.lib RuntimeObject.lib + delayimp.lib ) set(RUNTIMEINFO_LIB runtimeinfo) From 91123d8680a94a9af66fd791d2ed035326417848 Mon Sep 17 00:00:00 2001 From: Vladimir Sadov Date: Tue, 11 Jan 2022 09:54:08 -0800 Subject: [PATCH 2/2] Trivial change to rerun tests --- src/native/corehost/apphost/static/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/native/corehost/apphost/static/CMakeLists.txt b/src/native/corehost/apphost/static/CMakeLists.txt index 0216ed1f09a076..a00c79139863fb 100644 --- a/src/native/corehost/apphost/static/CMakeLists.txt +++ b/src/native/corehost/apphost/static/CMakeLists.txt @@ -111,7 +111,7 @@ if(CLR_CMAKE_TARGET_WIN32) # invariants (e.g. size of region between Jit_PatchedCodeLast-Jit_PatchCodeStart needs to fit in a page). add_linker_flag("/INCREMENTAL:NO") - # Delay load libraries required for WinRT as that is not supported on all platforms + # Delay load libraries required for WinRT as that is not supported on all platforms. add_linker_flag("/DELAYLOAD:api-ms-win-core-winrt-l1-1-0.dll") endif()