From b94ae8e965b1997e3f3e2c28fe5f69daa33ca5af Mon Sep 17 00:00:00 2001 From: Brian Martin <42186431+martinb35@users.noreply.github.com> Date: Thu, 7 Nov 2019 14:29:11 -0800 Subject: [PATCH] Merged PR 3985217: add onecoreuap_apiset.lib in order to avoid linking against kernel32.lib etc (#2346) add onecoreuap_apiset.lib in order to avoid linking against kernel32.lib etc and violating our OS layering requirements. We linked against onecoreuap_apiset.lib in VB so we will continue doing this, but I am still unsure why not to link against onecore instead since that is where we ship. However, since Sheil is the owner of this code we will wait to discuss with him before changing anything. --- cmake/winml.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmake/winml.cmake b/cmake/winml.cmake index 0f17e0721c..a56548be7f 100644 --- a/cmake/winml.cmake +++ b/cmake/winml.cmake @@ -462,6 +462,7 @@ if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug") endif("${CMAKE_BUILD_TYPE}" STREQUAL "Debug") # Link libraries +target_link_libraries(winml_dll PRIVATE windowsapp.lib) target_link_libraries(winml_dll PRIVATE libprotobuf) target_link_libraries(winml_dll PRIVATE onnx) target_link_libraries(winml_dll PRIVATE onnxruntime_common) @@ -476,11 +477,11 @@ target_link_libraries(winml_dll PRIVATE onnxruntime_util) target_link_libraries(winml_dll PRIVATE onnx_proto) target_link_libraries(winml_dll PRIVATE re2) target_link_libraries(winml_dll PRIVATE wil) -target_link_libraries(winml_dll PRIVATE windowsapp.lib) target_link_libraries(winml_dll PRIVATE winml_lib_api) target_link_libraries(winml_dll PRIVATE winml_lib_core) target_link_libraries(winml_dll PRIVATE winml_lib_image) target_link_libraries(winml_dll PRIVATE winml_lib_telemetry) +target_link_libraries(winml_dll PRIVATE onecoreuap_apiset.lib) target_link_libraries(winml_dll PRIVATE ${DBGHELP}) # 1 of 3 projects that fail in link with 'failed to do memory mapped file I/O' (Only release)