diff options
author | John Chen (JOCHEN7) <jochen@microsoft.com> | 2015-04-28 13:20:01 -0700 |
---|---|---|
committer | John Chen (JOCHEN7) <jochen@microsoft.com> | 2015-04-28 23:15:22 -0700 |
commit | e0c80c5f5c7d395d79aa350a26f46101a78af95d (patch) | |
tree | ec611fcee20f99810a6704c26c2e790884d42976 /src/strongname | |
parent | 1827eb2ae3201ccba95ca228d657041c8af3410c (diff) | |
download | coreclr-e0c80c5f5c7d395d79aa350a26f46101a78af95d.tar.gz coreclr-e0c80c5f5c7d395d79aa350a26f46101a78af95d.tar.bz2 coreclr-e0c80c5f5c7d395d79aa350a26f46101a78af95d.zip |
Build crossgen for Linux
- Crossgen is now built as part of coreclr
- Crossgen successfully compiles mscorlib.dll
- Resulting mscorlib.ni.dll not yet usable
Diffstat (limited to 'src/strongname')
-rw-r--r-- | src/strongname/api/CMakeLists.txt | 4 | ||||
-rw-r--r-- | src/strongname/api/strongname.cpp | 14 | ||||
-rw-r--r-- | src/strongname/api/strongnameinternal.cpp | 10 | ||||
-rw-r--r-- | src/strongname/inc/strongnameholders.h | 2 | ||||
-rw-r--r-- | src/strongname/inc/strongnameinternal.h | 4 |
5 files changed, 16 insertions, 18 deletions
diff --git a/src/strongname/api/CMakeLists.txt b/src/strongname/api/CMakeLists.txt index 9b1a49025e..079d9a5559 100644 --- a/src/strongname/api/CMakeLists.txt +++ b/src/strongname/api/CMakeLists.txt @@ -24,6 +24,4 @@ endif(CLR_CMAKE_PLATFORM_UNIX) add_subdirectory(dac) add_subdirectory(wks) -if(WIN32) - add_subdirectory(crossgen) -endif(WIN32) +add_subdirectory(crossgen) diff --git a/src/strongname/api/strongname.cpp b/src/strongname/api/strongname.cpp index ec91fe8788..44ca1735cf 100644 --- a/src/strongname/api/strongname.cpp +++ b/src/strongname/api/strongname.cpp @@ -114,9 +114,9 @@ enum StrongNameCachedCsp { // allocated lazily as needed. struct SN_THREAD_CTX { DWORD m_dwLastError; -#if !defined(FEATURE_CORECLR) || defined(CROSSGEN_COMPILE) +#if !defined(FEATURE_CORECLR) || (defined(CROSSGEN_COMPILE) && !defined(PLATFORM_UNIX)) HCRYPTPROV m_hProv[CachedCspCount]; -#endif // !FEATURE_CORECLR || CROSSGEN_COMPILE +#endif // !FEATURE_CORECLR || (CROSSGEN_COMPILE && !PLATFORM_UNIX) }; #endif // !DACCESS_COMPILE @@ -200,7 +200,7 @@ struct SN_THREAD_CTX { #endif // FEATURE_WINDOWSPHONE #endif // FEATURE_CORECLR -#if !defined(FEATURE_CORECLR) || defined(CROSSGEN_COMPILE) +#if !defined(FEATURE_CORECLR) || (defined(CROSSGEN_COMPILE) && !defined(PLATFORM_UNIX)) #ifdef FEATURE_STRONGNAME_MIGRATION #include "caparser.h" @@ -4668,11 +4668,11 @@ ErrExit: #endif // #ifndef DACCESS_COMPILE -#else // !defined(FEATURE_CORECLR) || defined(CROSSGEN_COMPILE) +#else // !defined(FEATURE_CORECLR) || (defined(CROSSGEN_COMPILE) && !defined(PLATFORM_UNIX)) #define InitStrongName() S_OK -#endif // !defined(FEATURE_CORECLR) || defined(CROSSGEN_COMPILE) +#endif // !defined(FEATURE_CORECLR) || (defined(CROSSGEN_COMPILE) && !defined(PLATFORM_UNIX)) // Free buffer allocated by routines below. @@ -4698,12 +4698,12 @@ SN_THREAD_CTX *GetThreadContext() if (pThreadCtx == NULL) return NULL; pThreadCtx->m_dwLastError = S_OK; -#if !defined(FEATURE_CORECLR) || defined(CROSSGEN_COMPILE) +#if !defined(FEATURE_CORECLR) || (defined(CROSSGEN_COMPILE) && !defined(PLATFORM_UNIX)) for (ULONG i = 0; i < CachedCspCount; i++) { pThreadCtx->m_hProv[i] = NULL; } -#endif // !FEATURE_CORECLR || CROSSGEN_COMPILE +#endif // !FEATURE_CORECLR || (CROSSGEN_COMPILE && !PLATFORM_UNIX) EX_TRY { ClrFlsSetValue(TlsIdx_StrongName, pThreadCtx); diff --git a/src/strongname/api/strongnameinternal.cpp b/src/strongname/api/strongnameinternal.cpp index 10a08fa18d..5eda45f682 100644 --- a/src/strongname/api/strongnameinternal.cpp +++ b/src/strongname/api/strongnameinternal.cpp @@ -300,7 +300,7 @@ bool StrongNameIsValidPublicKey(const PublicKeyBlob &keyPublicKey, bool fImportK return false; } -#if !defined(FEATURE_CORECLR) || defined(CROSSGEN_COMPILE) +#if !defined(FEATURE_CORECLR) || (defined(CROSSGEN_COMPILE) && !defined(PLATFORM_UNIX)) // Make sure the public key blob imports properly if (fImportKeys) { @@ -316,9 +316,9 @@ bool StrongNameIsValidPublicKey(const PublicKeyBlob &keyPublicKey, bool fImportK return false; } } -#else // !FEATURE_CORECLR || CROSSGEN_COMPILE +#else // !FEATURE_CORECLR || (CROSSGEN_COMPILE && !PLATFORM_UNIX) _ASSERTE(!fImportKeys); -#endif // !FEATURE_CORECLR || CROSSGEN_COMPILE +#endif // !FEATURE_CORECLR || (CROSSGEN_COMPILE && !PLATFORM_UNIX) return true; } @@ -345,7 +345,7 @@ DWORD StrongNameSizeOfPublicKey(const PublicKeyBlob &keyPublicKey) GET_UNALIGNED_VAL32(&keyPublicKey.cbPublicKey); // the number of bytes in the key } -#if !defined(FEATURE_CORECLR) || defined(CROSSGEN_COMPILE) +#if !defined(FEATURE_CORECLR) || (defined(CROSSGEN_COMPILE) && !defined(PLATFORM_UNIX)) //--------------------------------------------------------------------------------------- // @@ -444,5 +444,5 @@ bool StrongNameCryptAcquireContext(HCRYPTPROV *phProv, LPCWSTR pwszContainer, LP return !!WszCryptAcquireContext(phProv, pwszContainer, pwszProvider, dwProvType, dwFlags); } -#endif // !FEATURE_CORECLR || CROSSGEN_COMPILE +#endif // !FEATURE_CORECLR || (CROSSGEN_COMPILE && !PLATFORM_UNIX) diff --git a/src/strongname/inc/strongnameholders.h b/src/strongname/inc/strongnameholders.h index 663fd5eaa6..36597ea97d 100644 --- a/src/strongname/inc/strongnameholders.h +++ b/src/strongname/inc/strongnameholders.h @@ -22,7 +22,7 @@ void VoidStrongNameFreeBuffer(__in T *pBuffer) } NEW_WRAPPER_TEMPLATE1(StrongNameBufferHolder, VoidStrongNameFreeBuffer<_TYPE>); -#if !defined(FEATURE_CORECLR) || defined(CROSSGEN_COMPILE) +#if !defined(FEATURE_CORECLR) || (defined(CROSSGEN_COMPILE) && !defined(PLATFORM_UNIX)) // Holder for HCRYPTPROV handles directly allocated from CAPI inline void ReleaseCapiProvider(HCRYPTPROV hProv) { diff --git a/src/strongname/inc/strongnameinternal.h b/src/strongname/inc/strongnameinternal.h index ec5fb5da90..6666bb261f 100644 --- a/src/strongname/inc/strongnameinternal.h +++ b/src/strongname/inc/strongnameinternal.h @@ -41,7 +41,7 @@ bool StrongNameIsEcmaKey(const PublicKeyBlob &keyPublicKey); bool StrongNameIsTheKey(__in_ecount(cbKey) const BYTE *pbKey, DWORD cbKey); -#if !defined(FEATURE_CORECLR) || defined(CROSSGEN_COMPILE) +#if !defined(FEATURE_CORECLR) || (defined(CROSSGEN_COMPILE) && !defined(PLATFORM_UNIX)) // Verify the format of a public key blob bool StrongNameIsValidKeyPair(__in_ecount(cbKeyPair) const BYTE *pbKeyPair, DWORD cbKeyPair); @@ -49,7 +49,7 @@ bool StrongNameIsValidKeyPair(__in_ecount(cbKeyPair) const BYTE *pbKeyPair, DWOR bool GetBytesFromHex(LPCUTF8 szHexString, ULONG cchHexString, BYTE** buffer, ULONG *cbBufferSize); bool StrongNameCryptAcquireContext(HCRYPTPROV *phProv, LPCWSTR pwszContainer, LPCWSTR pwszProvider, DWORD dwProvType, DWORD dwFlags); -#endif // !FEATURE_CORECLR || CROSSGEN_COMPILE +#endif // !FEATURE_CORECLR || (CROSSGEN_COMPILE && !PLATFORM_UNIX) #ifdef FEATURE_CORECLR bool StrongNameIsSilverlightPlatformKey(__in_ecount(cbKey) const BYTE *pbKey, DWORD cbKey); |