diff options
author | Martin Baulig <mabaul@microsoft.com> | 2019-05-15 02:30:01 +0300 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2019-05-21 13:33:55 +0300 |
commit | 1eb9161ca6b096e5f13f1a604e38557dde6e5c74 (patch) | |
tree | 5850fd48b180661a540c55d9114b010cc26c4bd7 /mcs/class/System.ServiceModel.Internals | |
parent | aee4cdd248cded15c47dc64e61c78ca48c235af3 (diff) |
Removing some remoting and multi-appdomain APIs on wasm and the AOT test profiles.
Build / profile changes:
------------------------
* `build/profiles/testing_aot_common.make`: define `DISABLE_REMOTING = yes` and
`NO_MULTIPLE_APPDOMAINS = yes`.
* `mcs/class/corlib/Makefile`: check `DISABLE_REMOTING` when setting
`REFERENCE_SOURCES_FLAGS` (and don't define `FEATURE_REMOTING`, `MONO_COM`
and `FEATURE_COMINTEROP`).
* added new `testing_aot_common_corlib.dll.exclude.sources`. Several types in
the `System.Runtime.Remoting.Messaging` namespace are used by the runtime in
non-remoting scenarios, so those need to be preserved.
For all other remoting namespaces, we only need a few stripped down stub versions
of the some of the types; those have been added to a new `legacy` directory, so
we can wildcard-exclude all the files here.
* added new `testing_aot_common_corlib.dll.sources`; this currently only contains
`legacy/*.cs` to list above mentioned stub versions.
* added new `testing_aot_common_corlib_test.dll.exclude.sources` as a common test
excludes file.
API Changes (conditional to `DISABLE_REMOTING`):
------------------------------------------------
* `mcs/class/corlib/legacy/`: add stub-versions for some of the remoting-related
classes that are used by the runtime (so we can't completely remove those types):
- `System.MarshalByRefObject`.
- `System.Runtime.Remoting.IRemotingTypeInfo`.
- `System.Runtime.Remoting.ObjectHandle`.
- `System.Runtime.Remoting.RemotingServices`.
- `System.Runtime.Remoting.Activation.ActivationServices`.
- `System.Runtime.Remoting.Contexts.Context`.
- `System.Runtime.Remoting.Messaging.ILogicalThreadAffinative`.
- `System.Runtime.Remoting.Messaging.LogicalCallContext`.
- `System.Runtime.Remoting.Proxies.TransparentProxy`.
- `System.Runtime.Remoting.Proxies.RealProxy`.
some of these have fields that need to be preserved; these are marked with
appropriate `#region` pragmas.
All changes below are conditional to `DISABLE_REMOTING`.
* `System.Runtime.Remoting.Messaging.AsyncResult`: this class is used by some of
the async code, so we can't completely remove it. However, we can remove the
`MonoMethodMessage call_message` field when `DISABLE_REMOTING`.
* `System.Runtime.Remoting.Messaging.MonoMethodMessage`: this class is also used
by some runtime code and thus needs to be preserved. However, when `DISABLE_REMOTING`
is defined, then we make some changes to it:
- remove all iterfaces (`IMethodCallMessage`, `IMethodReturnMessage`, and `IInternalMessage`).
- `Properties` throws `PlatformNotSupportedException`.
* `System.Runtime.InteropServices.Marshal`: disable some COM-related code.
* `System.Threading.Thread`: remove `CurrentContext` property.
* `System.Threading.ExecutionContext`: adjust conditional logic; don't define
`FEATURE_REMOTING` if `DISABLE_REMOTING`.
* `System.Activator`: add `DISABLE_REMOTING` to the existing
`#if FEATURE_REMOTING || MOBILE_LEGACY` conditional in this class.
* `System.AppDomain`: since we only have one domain, `DefaultDomain` will always
return the root domain; comment out the call to `RemotingServices.GetDomainProxy`
as well as some internal methods.
* `System.__ComObject`: stub out on `DISABLE_REMOTING` as well as `!FULL_AOT_RUNTIME`.
* `System.Runtime.Serialization.Formatters.Binary.BinaryFormatter`: adjust `IFormatter`
versus `IRemotingFormatter` interface logic to use the former when `DISABLE_REMOTING`.
* `System.Runtime.Serialization.Formatters.Binary.BinaryObjectReader`: adjust existing
`#if FEATURE_REMOTING || MOBILE_LEGACY` conditional to add `DISABLE_REMOTING` to it.
* `System.Diagnostics.CorrelationManager`: comment out some `CallContext.LogicalGetData()`
and `CallContext.LogicalSetData`.
* `System.Diagnostics.TraceEventCache`: likewise.
Test changes:
-------------
* `mono/tests/Makefile.am`: conditionally disable some remoting tests.
* `corlib/Test/System.Runtime.Serialization/SerializationTest.cs`: conditionally
disable all tests requiring remoting.
* `corlib/Test/System/ActivatorTest.cs`: same; trying to preserve as much as possible
in this test.
* added some `DISABLE_REMOTING` and `DISABLE_SECURITY` conditionals to some of the tests.
Diffstat (limited to 'mcs/class/System.ServiceModel.Internals')
-rw-r--r-- | mcs/class/System.ServiceModel.Internals/System.ServiceModel.Internals.csproj | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mcs/class/System.ServiceModel.Internals/System.ServiceModel.Internals.csproj b/mcs/class/System.ServiceModel.Internals/System.ServiceModel.Internals.csproj index c855f7f5672..ab7ceabc49e 100644 --- a/mcs/class/System.ServiceModel.Internals/System.ServiceModel.Internals.csproj +++ b/mcs/class/System.ServiceModel.Internals/System.ServiceModel.Internals.csproj @@ -52,17 +52,17 @@ <PropertyGroup Condition=" '$(Platform)' == 'testing_aot_full_interp' "> <OutputPath>./../../class/lib/testing_aot_full_interp</OutputPath> <IntermediateOutputPath>./../../class/obj/$(AssemblyName)-testing_aot_full_interp</IntermediateOutputPath> - <DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;DISABLE_REMOTING;DISABLE_SECURITY;FULL_AOT_INTERP;DISABLE_COM;MONO_FEATURE_MULTIPLE_APPDOMAINS</DefineConstants> + <DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;DISABLE_REMOTING;DISABLE_SECURITY;FULL_AOT_INTERP;DISABLE_COM</DefineConstants> </PropertyGroup> <PropertyGroup Condition=" '$(Platform)' == 'testing_aot_hybrid' "> <OutputPath>./../../class/lib/testing_aot_hybrid</OutputPath> <IntermediateOutputPath>./../../class/obj/$(AssemblyName)-testing_aot_hybrid</IntermediateOutputPath> - <DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;DISABLE_REMOTING;DISABLE_SECURITY;MOBILE_DYNAMIC;MONO_FEATURE_MULTIPLE_APPDOMAINS</DefineConstants> + <DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;DISABLE_REMOTING;DISABLE_SECURITY;MOBILE_DYNAMIC</DefineConstants> </PropertyGroup> <PropertyGroup Condition=" '$(Platform)' == 'testing_aot_full' "> <OutputPath>./../../class/lib/testing_aot_full</OutputPath> <IntermediateOutputPath>./../../class/obj/$(AssemblyName)-testing_aot_full</IntermediateOutputPath> - <DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;DISABLE_REMOTING;DISABLE_SECURITY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;DISABLE_COM;MONO_FEATURE_MULTIPLE_APPDOMAINS</DefineConstants> + <DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;DISABLE_REMOTING;DISABLE_SECURITY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;DISABLE_COM</DefineConstants> </PropertyGroup> <PropertyGroup Condition=" '$(Platform)' == 'winaot' "> <OutputPath>./../../class/lib/winaot</OutputPath> |