Skip to content

Commit 780667b

Browse files
committed
Revert changes to native libs and exclude singlefilehost
1 parent 44fe9c5 commit 780667b

File tree

6 files changed

+23
-33
lines changed

6 files changed

+23
-33
lines changed

src/coreclr/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ include(components.cmake)
5959
#---------------------------
6060
# Build the single file host
6161
#---------------------------
62-
if(NOT CLR_CROSS_COMPONENTS_BUILD)
62+
if(NOT CLR_CROSS_COMPONENTS_BUILD AND NOT CLR_CMAKE_TARGET_MACCATALYST AND NOT CLR_CMAKE_TARGET_IOS AND NOT CLR_CMAKE_TARGET_TVOS)
6363
set(CLR_SINGLE_FILE_HOST_ONLY 1)
6464
add_subdirectory(${CLR_SRC_NATIVE_DIR}/corehost/apphost/static Corehost.Static)
6565
add_dependencies(runtime singlefilehost)

src/native/libs/System.Native/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ if (GEN_SHARED_LIB)
126126
install_with_stripped_symbols (System.Native PROGRAMS .)
127127
endif ()
128128

129-
if (NOT GEN_SHARED_LIB AND NOT CLR_CMAKE_TARGET_ANDROID AND NOT CLR_CMAKE_TARGET_BROWSER AND NOT CLR_CMAKE_TARGET_WASI)
129+
if (NOT GEN_SHARED_LIB AND NOT CLR_CMAKE_TARGET_MACCATALYST AND NOT CLR_CMAKE_TARGET_IOS AND NOT CLR_CMAKE_TARGET_TVOS AND NOT CLR_CMAKE_TARGET_ANDROID AND NOT CLR_CMAKE_TARGET_BROWSER AND NOT CLR_CMAKE_TARGET_WASI)
130130
set(NATIVE_SOURCES ${NATIVE_SOURCES} entrypoints.c)
131131
endif()
132132

src/native/libs/System.Native/entrypoints.c

-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
static const Entry s_sysNative[] =
3535
{
3636
DllImportEntry(SystemNative_FStat)
37-
#if !defined(TARGET_APPLE) || defined(TARGET_OSX)
3837
DllImportEntry(SystemNative_GetWindowSize)
3938
DllImportEntry(SystemNative_IsATty)
4039
DllImportEntry(SystemNative_InitializeTerminalAndSignalHandling)
@@ -47,7 +46,6 @@ static const Entry s_sysNative[] =
4746
DllImportEntry(SystemNative_ReadStdin)
4847
DllImportEntry(SystemNative_GetSignalForBreak)
4948
DllImportEntry(SystemNative_SetSignalForBreak)
50-
#endif // !defined(TARGET_APPLE) || defined(TARGET_OSX)
5149
DllImportEntry(SystemNative_GetSystemTimeAsTicks)
5250
DllImportEntry(SystemNative_GetDefaultTimeZone)
5351
DllImportEntry(SystemNative_GetTimeZoneData)

src/native/libs/System.Net.Security.Native/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ if (GEN_SHARED_LIB)
1919
)
2020
endif()
2121

22-
if (NOT GEN_SHARED_LIB AND NOT CLR_CMAKE_TARGET_ANDROID AND NOT CLR_CMAKE_TARGET_BROWSER AND NOT CLR_CMAKE_TARGET_WASI)
22+
if (NOT GEN_SHARED_LIB AND NOT CLR_CMAKE_TARGET_MACCATALYST AND NOT CLR_CMAKE_TARGET_IOS AND NOT CLR_CMAKE_TARGET_TVOS AND NOT CLR_CMAKE_TARGET_ANDROID AND NOT CLR_CMAKE_TARGET_BROWSER AND NOT CLR_CMAKE_TARGET_WASI)
2323
set(NATIVEGSS_SOURCES ${NATIVEGSS_SOURCES} entrypoints.c)
2424
endif()
2525

src/native/libs/System.Security.Cryptography.Native.Apple/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ if (GEN_SHARED_LIB)
105105
)
106106
endif()
107107

108-
if (NOT GEN_SHARED_LIB)
108+
if (NOT GEN_SHARED_LIB AND NOT CLR_CMAKE_TARGET_MACCATALYST AND NOT CLR_CMAKE_TARGET_IOS AND NOT CLR_CMAKE_TARGET_TVOS)
109109
set(NATIVECRYPTO_SOURCES ${NATIVECRYPTO_SOURCES} entrypoints.c)
110110
endif()
111111

src/native/libs/System.Security.Cryptography.Native.Apple/entrypoints.c

+19-27
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include "pal_ecc.h"
99
#include "pal_hmac.h"
1010
#include "pal_keyagree.h"
11+
#include "pal_keychain_macos.h"
1112
#include "pal_keyderivation.h"
1213
#include "pal_random.h"
1314
#include "pal_rsa.h"
@@ -18,16 +19,10 @@
1819
#include "pal_ssl.h"
1920
#include "pal_swiftbindings.h"
2021
#include "pal_symmetric.h"
21-
#include "pal_x509.h"
22-
#include "pal_x509chain.h"
23-
#if defined(TARGET_OSX)
2422
#include "pal_trust_macos.h"
25-
#include "pal_keychain_macos.h"
23+
#include "pal_x509.h"
2624
#include "pal_x509_macos.h"
27-
#else
28-
#include "pal_keychain_ios.h"
29-
#include "pal_x509_ios.h"
30-
#endif // defined(TARGET_OSX)
25+
#include "pal_x509chain.h"
3126

3227
static const Entry s_cryptoAppleNative[] =
3328
{
@@ -36,7 +31,6 @@ static const Entry s_cryptoAppleNative[] =
3631
DllImportEntry(AppleCryptoNative_ChaCha20Poly1305Encrypt)
3732
DllImportEntry(AppleCryptoNative_ChaCha20Poly1305Decrypt)
3833
DllImportEntry(AppleCryptoNative_DigestClone)
39-
DllImportEntry(AppleCryptoNative_DigestFree)
4034
DllImportEntry(AppleCryptoNative_DigestCreate)
4135
DllImportEntry(AppleCryptoNative_DigestCurrent)
4236
DllImportEntry(AppleCryptoNative_DigestFinal)
@@ -57,8 +51,15 @@ static const Entry s_cryptoAppleNative[] =
5751
DllImportEntry(AppleCryptoNative_HmacOneShot)
5852
DllImportEntry(AppleCryptoNative_HmacUpdate)
5953
DllImportEntry(AppleCryptoNative_IsAuthenticationFailure)
54+
DllImportEntry(AppleCryptoNative_SecKeychainItemCopyKeychain)
55+
DllImportEntry(AppleCryptoNative_SecKeychainCopyDefault)
56+
DllImportEntry(AppleCryptoNative_SecKeychainCreate)
57+
DllImportEntry(AppleCryptoNative_SecKeychainDelete)
6058
DllImportEntry(AppleCryptoNative_SecKeychainEnumerateCerts)
59+
DllImportEntry(AppleCryptoNative_SecKeychainOpen)
60+
DllImportEntry(AppleCryptoNative_SecKeychainUnlock)
6161
DllImportEntry(AppleCryptoNative_SecKeychainEnumerateIdentities)
62+
DllImportEntry(AppleCryptoNative_SetKeychainNeverLock)
6263
DllImportEntry(AppleCryptoNative_SslCopyCADistinguishedNames)
6364
DllImportEntry(AppleCryptoNative_SslCopyCertChain)
6465
DllImportEntry(AppleCryptoNative_SslIsHostnameMatch)
@@ -79,6 +80,8 @@ static const Entry s_cryptoAppleNative[] =
7980
DllImportEntry(AppleCryptoNative_RsaEncryptionPrimitive)
8081
DllImportEntry(AppleCryptoNative_RsaVerificationPrimitive)
8182
DllImportEntry(AppleCryptoNative_SecCopyErrorMessageString)
83+
DllImportEntry(AppleCryptoNative_SecKeyExport)
84+
DllImportEntry(AppleCryptoNative_SecKeyImportEphemeral)
8285
DllImportEntry(AppleCryptoNative_SecKeyGetSimpleKeySizeInBytes)
8386
DllImportEntry(AppleCryptoNative_SecKeyCreateSignature)
8487
DllImportEntry(AppleCryptoNative_SecKeyVerifySignature)
@@ -105,6 +108,10 @@ static const Entry s_cryptoAppleNative[] =
105108
DllImportEntry(AppleCryptoNative_CryptorCreate)
106109
DllImportEntry(AppleCryptoNative_CryptorUpdate)
107110
DllImportEntry(AppleCryptoNative_CryptorReset)
111+
DllImportEntry(AppleCryptoNative_StoreEnumerateUserRoot)
112+
DllImportEntry(AppleCryptoNative_StoreEnumerateMachineRoot)
113+
DllImportEntry(AppleCryptoNative_StoreEnumerateUserDisallowed)
114+
DllImportEntry(AppleCryptoNative_StoreEnumerateMachineDisallowed)
108115
DllImportEntry(AppleCryptoNative_X509ChainCreate)
109116
DllImportEntry(AppleCryptoNative_X509DemuxAndRetainHandle)
110117
DllImportEntry(AppleCryptoNative_X509GetContentType)
@@ -113,7 +120,10 @@ static const Entry s_cryptoAppleNative[] =
113120
DllImportEntry(AppleCryptoNative_X509CopyPrivateKeyFromIdentity)
114121
DllImportEntry(AppleCryptoNative_X509ImportCollection)
115122
DllImportEntry(AppleCryptoNative_X509ImportCertificate)
123+
DllImportEntry(AppleCryptoNative_X509ExportData)
116124
DllImportEntry(AppleCryptoNative_X509GetRawData)
125+
DllImportEntry(AppleCryptoNative_X509CopyWithPrivateKey)
126+
DllImportEntry(AppleCryptoNative_X509MoveToKeychain)
117127
DllImportEntry(AppleCryptoNative_X509ChainCreateDefaultPolicy)
118128
DllImportEntry(AppleCryptoNative_X509ChainCreateRevocationPolicy)
119129
DllImportEntry(AppleCryptoNative_X509ChainEvaluate)
@@ -127,24 +137,6 @@ static const Entry s_cryptoAppleNative[] =
127137
DllImportEntry(AppleCryptoNative_X509StoreRemoveCertificate)
128138
DllImportEntry(AppleCryptoNative_Pbkdf2)
129139
DllImportEntry(AppleCryptoNative_X509GetSubjectSummary)
130-
#ifdef TARGET_OSX
131-
DllImportEntry(AppleCryptoNative_SecKeychainItemCopyKeychain)
132-
DllImportEntry(AppleCryptoNative_SecKeychainCopyDefault)
133-
DllImportEntry(AppleCryptoNative_SecKeychainCreate)
134-
DllImportEntry(AppleCryptoNative_SecKeychainDelete)
135-
DllImportEntry(AppleCryptoNative_SecKeychainOpen)
136-
DllImportEntry(AppleCryptoNative_SecKeychainUnlock)
137-
DllImportEntry(AppleCryptoNative_SetKeychainNeverLock)
138-
DllImportEntry(AppleCryptoNative_SecKeyExport)
139-
DllImportEntry(AppleCryptoNative_SecKeyImportEphemeral)
140-
DllImportEntry(AppleCryptoNative_StoreEnumerateUserRoot)
141-
DllImportEntry(AppleCryptoNative_StoreEnumerateMachineRoot)
142-
DllImportEntry(AppleCryptoNative_StoreEnumerateUserDisallowed)
143-
DllImportEntry(AppleCryptoNative_StoreEnumerateMachineDisallowed)
144-
DllImportEntry(AppleCryptoNative_X509ExportData)
145-
DllImportEntry(AppleCryptoNative_X509CopyWithPrivateKey)
146-
DllImportEntry(AppleCryptoNative_X509MoveToKeychain)
147-
#endif // defined(TARGET_OSX)
148140
};
149141

150142
EXTERN_C const void* CryptoAppleResolveDllImport(const char* name);

0 commit comments

Comments
 (0)