From b7fa391b2bec1380b4c2975ffa76675d5fcbe8b9 Mon Sep 17 00:00:00 2001 From: vsadov Date: Wed, 15 Jul 2020 14:02:52 -0700 Subject: [PATCH] a few nits --- src/coreclr/src/vm/dllimport.cpp | 3 ++- src/installer/corehost/cli/apphost/static/CMakeLists.txt | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/coreclr/src/vm/dllimport.cpp b/src/coreclr/src/vm/dllimport.cpp index 29a4a56d1f0f1..2fd2fefd1bc8a 100644 --- a/src/coreclr/src/vm/dllimport.cpp +++ b/src/coreclr/src/vm/dllimport.cpp @@ -6309,6 +6309,7 @@ namespace #if defined(TARGET_LINUX) if (g_coreclr_embedded) { + // this matches exactly the names in Interop.Libraries.cs static const LPCWSTR toRedirect[] = { W("libSystem.Native"), W("libSystem.IO.Compression.Native"), @@ -6316,7 +6317,7 @@ namespace W("libSystem.Security.Cryptography.Native.OpenSsl") }; - int count = sizeof(toRedirect) / sizeof(toRedirect[0]); + int count = lengthof(toRedirect); for (int i = 0; i < count; ++i) { if (wcscmp(wszLibName, toRedirect[i]) == 0) diff --git a/src/installer/corehost/cli/apphost/static/CMakeLists.txt b/src/installer/corehost/cli/apphost/static/CMakeLists.txt index f2a4c0a23b331..6d8d3f431aef2 100644 --- a/src/installer/corehost/cli/apphost/static/CMakeLists.txt +++ b/src/installer/corehost/cli/apphost/static/CMakeLists.txt @@ -194,7 +194,7 @@ else() set(START_WHOLE_ARCHIVE -Wl,--whole-archive) set(END_WHOLE_ARCHIVE -Wl,--no-whole-archive) endif(CLR_CMAKE_TARGET_LINUX OR CLR_CMAKE_TARGET_FREEBSD OR CLR_CMAKE_TARGET_NETBSD OR CLR_CMAKE_TARGET_SUNOS) -endif(CLR_CMAKE_TARGET_WIN32 OR CLR_CMAKE_TARGET_OSX) +endif(NOT CLR_CMAKE_TARGET_LINUX) set_property(TARGET singlefilehost PROPERTY ENABLE_EXPORTS 1)