From a746372f5eddf7612650d5416c08d87c1d7e91a3 Mon Sep 17 00:00:00 2001 From: Filip Navara Date: Sat, 30 Nov 2024 13:49:01 +0100 Subject: [PATCH] Revert more singlefilehost changes --- src/native/corehost/apphost/static/CMakeLists.txt | 8 ++++---- src/native/corehost/hostmisc/pal.h | 2 +- src/native/corehost/hostpolicy/hostpolicy_context.cpp | 4 +--- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/native/corehost/apphost/static/CMakeLists.txt b/src/native/corehost/apphost/static/CMakeLists.txt index 4565d4423dc069..c013b3fcce0d71 100644 --- a/src/native/corehost/apphost/static/CMakeLists.txt +++ b/src/native/corehost/apphost/static/CMakeLists.txt @@ -167,6 +167,7 @@ else() System.IO.Compression.Native-Static System.Net.Security.Native-Static System.Native-Static + System.Security.Cryptography.Native.OpenSsl-Static coreclrpal_dac corguids @@ -175,10 +176,6 @@ else() nativeresourcestring ) - if(NOT CLR_CMAKE_TARGET_MACCATALYST AND NOT CLR_CMAKE_TARGET_IOS AND NOT CLR_CMAKE_TARGET_TVOS AND NOT CLR_CMAKE_HOST_ANDROID) - LIST(APPEND NATIVE_LIBS System.Security.Cryptography.Native.OpenSsl-Static) - endif() - # additional requirements for System.IO.Compression.Native include(${CLR_SRC_NATIVE_DIR}/libs/System.IO.Compression.Native/extra_libs.cmake) append_extra_compression_libs(NATIVE_LIBS) @@ -200,6 +197,7 @@ else() endif() set(RUNTIMEINFO_LIB runtimeinfo) + endif() if(CLR_CMAKE_TARGET_APPLE) @@ -217,11 +215,13 @@ endif() # if(CLR_CMAKE_TARGET_APPLE) find_library(COREFOUNDATION CoreFoundation) + find_library(CORESERVICES CoreServices) find_library(SECURITY Security) find_library(SYSTEM System) LIST(APPEND NATIVE_LIBS ${COREFOUNDATION} + ${CORESERVICES} ${SECURITY} ${SYSTEM} ) diff --git a/src/native/corehost/hostmisc/pal.h b/src/native/corehost/hostmisc/pal.h index 0c1f1b2d787c54..bde8446cc22cdf 100644 --- a/src/native/corehost/hostmisc/pal.h +++ b/src/native/corehost/hostmisc/pal.h @@ -71,7 +71,7 @@ #if defined(TARGET_WINDOWS) #define LIB_PREFIX "" #define LIB_FILE_EXT ".dll" -#elif defined(TARGET_APPLE) +#elif defined(TARGET_OSX) #define LIB_PREFIX "lib" #define LIB_FILE_EXT ".dylib" #else diff --git a/src/native/corehost/hostpolicy/hostpolicy_context.cpp b/src/native/corehost/hostpolicy/hostpolicy_context.cpp index 351fc02377c74f..63ef9cdbc0d32f 100644 --- a/src/native/corehost/hostpolicy/hostpolicy_context.cpp +++ b/src/native/corehost/hostpolicy/hostpolicy_context.cpp @@ -70,12 +70,10 @@ namespace return SystemResolveDllImport(entry_point_name); } -#if !defined(TARGET_APPLE) || defined(TARGET_OSX) if (strcmp(library_name, LIB_NAME("System.Security.Cryptography.Native.OpenSsl")) == 0) { return CryptoResolveDllImport(entry_point_name); } -#endif // !defined(TARGET_APPLE) || defined(TARGET_OSX) #endif if (strcmp(library_name, LIB_NAME("System.IO.Compression.Native")) == 0) @@ -97,7 +95,7 @@ namespace } } -#if defined(TARGET_APPLE) +#if defined(TARGET_OSX) if (strcmp(library_name, LIB_NAME("System.Security.Cryptography.Native.Apple")) == 0) { return CryptoAppleResolveDllImport(entry_point_name);