Enable building of monotouch and xammac profiles without mono-extensions

By using the <profile>_opt_<assembly>.sources file we can specify files
that are used when mono-extension is not enabled and add shims for the
classes or methods that are missing an implementation in that case.

This allows us to build the monotouch and xammac profiles on public Jenkins.
This commit is contained in:
Alexander Köplinger committed 2016-03-01 02:37:34 +01:00
1 parent 9d596e5b2b
commit 82a1747f86
25 files changed
+109 -26

No files matched your search

@@ -0,0 +1 @@
#include monotouch_opt_Mono.Security.dll.sources
@@ -0,0 +1 @@
#include monotouch_opt_Mono.Security.dll.sources
@@ -0,0 +1,4 @@
./Mono.Security.Cryptography/ARC4Managed.cs
./Mono.Security.Cryptography/MD2Managed.cs
./Mono.Security.Cryptography/MD4Managed.cs
./Mono.Security.Cryptography/SHA224Managed.cs
@@ -0,0 +1,15 @@
#if MONOTOUCH || XAMMAC
// this file is a shim to enable compiling monotouch profiles without mono-extensions
namespace Mono.Net.Security
{
static partial class MonoTlsProviderFactory
{
static IMonoTlsProvider CreateDefaultProvider ()
{
throw new System.NotSupportedException ();
}
}
}
#endif
@@ -0,0 +1 @@
Mono.Net.Security/MonoTlsProviderFactory.MonoTouch.opt.cs
@@ -0,0 +1 @@
#include monotouch_opt_System.dll.sources
@@ -0,0 +1 @@
#include monotouch_opt_System.dll.sources
@@ -0,0 +1 @@
#include monotouch_opt_System.dll.sources
@@ -0,0 +1 @@
#include monotouch_opt_System.dll.sources
@@ -0,0 +1 @@
#include monotouch_opt_System.dll.sources
@@ -0,0 +1 @@
#include xammac_opt_System.dll.sources
@@ -0,0 +1 @@
Mono.Net.Security/MonoTlsProviderFactory.MonoTouch.opt.cs
@@ -0,0 +1,20 @@
#if MONOTOUCH || XAMMAC
// this file is a shim to enable compiling monotouch profiles without mono-extensions
namespace System.Security.Cryptography.X509Certificates
{
static partial class X509Helper
{
public static X509CertificateImpl InitFromHandle (IntPtr handle)
{
throw new NotSupportedException ();
}
public static X509CertificateImpl Import (byte[] rawData, string password, X509KeyStorageFlags keyStorageFlags)
{
throw new NotSupportedException ();
}
}
}
#endif
@@ -0,0 +1,15 @@
#if MONOTOUCH
// this file is a shim to enable compiling monotouch profiles without mono-extensions
namespace System.Text
{
internal static partial class EncodingHelper
{
internal static Encoding GetDefaultEncoding ()
{
throw new NotSupportedException ();
}
}
}
#endif
@@ -0,0 +1,20 @@
#if MONOTOUCH
// this file is a shim to enable compiling monotouch profiles without mono-extensions
namespace System
{
public static partial class Environment
{
public static string GetFolderPath(SpecialFolder folder, SpecialFolderOption option)
{
throw new NotSupportedException ();
}
internal static string UnixGetFolderPath (SpecialFolder folder, SpecialFolderOption option)
{
throw new NotSupportedException ();
}
}
}
#endif
-25
View File
@@ -1,25 +0,0 @@
#if MONOTOUCH && FULL_AOT_RUNTIME
using Crimson.CommonCrypto;
namespace System
{
partial struct Guid
{
public static Guid NewGuid ()
{
byte[] b = new byte [16];
Cryptor.GetRandom (b);
Guid res = new Guid (b);
// Mask in Variant 1-0 in Bit[7..6]
res._d = (byte) ((res._d & 0x3fu) | 0x80u);
// Mask in Version 4 (random based Guid) in Bits[15..13]
res._c = (short) ((res._c & 0x0fffu) | 0x4000u);
return res;
}
}
}
#endif
@@ -0,0 +1,15 @@
#if MONOTOUCH && FULL_AOT_RUNTIME
// this file is a shim to enable compiling monotouch profiles without mono-extensions
namespace System
{
partial struct Guid
{
public static Guid NewGuid ()
{
throw new NotSupportedException ();
}
}
}
#endif
-1
View File
@@ -104,7 +104,6 @@ System/GC.cs
System/GCCollectionMode.cs
System/GCNotificationStatus.cs
System/Guid.cs
System/Guid.MonoTouch.cs
System/IConsoleDriver.cs
System/IntPtr.cs
System/KnownTerminals.cs
@@ -0,0 +1,4 @@
System/Environment.MonoTouch.opt.cs
System/Guid.MonoTouch.opt.cs
System.Text/EncodingHelper.MonoTouch.opt.cs
System.Security.Cryptography.X509Certificates/X509Helper.MonoTouch.opt.cs
@@ -0,0 +1 @@
#include monotouch_opt_corlib.dll.sources
@@ -0,0 +1 @@
#include monotouch_opt_corlib.dll.sources
@@ -0,0 +1 @@
#include monotouch_opt_corlib.dll.sources
@@ -0,0 +1 @@
#include monotouch_opt_corlib.dll.sources
@@ -0,0 +1 @@
#include monotouch_opt_corlib.dll.sources
@@ -0,0 +1 @@
System.Security.Cryptography.X509Certificates/X509Helper.MonoTouch.opt.cs