From 90ca313240ae60d295d61d85e64c248fee94d2f7 Mon Sep 17 00:00:00 2001 From: Marek Safar Date: Tue, 27 Jun 2017 20:47:19 +0200 Subject: [PATCH] [build] Add a new profile --- configure.ac | 26 +++++++++++++-- mcs/Makefile | 2 ++ mcs/build/profiles/unreal.make | 33 +++++++++++++++++++ .../System.Drawing.Primitives/Makefile | 2 +- mcs/class/Facades/netstandard/Makefile | 2 +- mcs/class/Facades/subdirs.make | 3 ++ mcs/class/Makefile | 8 ++++- .../unreal_System.Core.dll.sources | 14 ++++++++ .../unreal_System.Data.dll.sources | 1 + mcs/class/System.Drawing/Makefile | 6 ++-- .../unreal_System.IdentityModel.dll.sources | 1 + ...l_System.Runtime.Serialization.dll.sources | 1 + ...unreal_System.ServiceModel.Web.dll.sources | 1 + .../unreal_System.ServiceModel.dll.sources | 1 + .../unreal_System.Web.Services.dll.sources | 1 + .../System.XML/unreal_System.Xml.dll.sources | 1 + mcs/class/System/unreal_System.dll.sources | 1 + 17 files changed, 96 insertions(+), 8 deletions(-) create mode 100644 mcs/build/profiles/unreal.make create mode 100644 mcs/class/System.Core/unreal_System.Core.dll.sources create mode 100644 mcs/class/System.Data/unreal_System.Data.dll.sources create mode 100644 mcs/class/System.IdentityModel/unreal_System.IdentityModel.dll.sources create mode 100644 mcs/class/System.Runtime.Serialization/unreal_System.Runtime.Serialization.dll.sources create mode 100644 mcs/class/System.ServiceModel.Web/unreal_System.ServiceModel.Web.dll.sources create mode 100644 mcs/class/System.ServiceModel/unreal_System.ServiceModel.dll.sources create mode 100644 mcs/class/System.Web.Services/unreal_System.Web.Services.dll.sources create mode 100644 mcs/class/System.XML/unreal_System.Xml.dll.sources create mode 100644 mcs/class/System/unreal_System.dll.sources diff --git a/configure.ac b/configure.ac index 3c3e617d759..a61341e306f 100644 --- a/configure.ac +++ b/configure.ac @@ -812,7 +812,8 @@ AC_ARG_WITH(xammac, [ --with-xammac=yes,no If you w AC_ARG_WITH(testing_aot_hybrid, [ --with-testing_aot_hybrid=yes,no If you want to build the testing_aot_hybrid assemblies (defaults to no)], [], [with_testing_aot_hybrid=default]) AC_ARG_WITH(testing_aot_full, [ --with-testing_aot_full=yes,no If you want to build the testing_aot_full assemblies (defaults to no)], [], [with_testing_aot_full=default]) AC_ARG_WITH(winaot, [ --with-winaot=yes,no If you want to build the Windows friendly AOT assemblies (defaults to no)], [], [with_winaot=default]) -AC_ARG_WITH(orbis, [ --with-orbis=yes,no If you want to build the Orbis assemblies (defaults to no)], [], [with_orbis=default]) +AC_ARG_WITH(orbis, [ --with-orbis=yes,no If you want to build the Orbis assemblies (defaults to no)], [], [with_orbis=default]) +AC_ARG_WITH(unreal, [ --with-unreal=yes,no If you want to build the Unreal assemblies (defaults to no)], [], [with_unreal=default]) AC_ARG_WITH(runtime_preset, [ --with-runtime_preset=net_4_x,all,aot,hybridaot,fullaot,bitcode Which default profile to build (defaults to net_4_x)], [], [with_runtime_preset=net_4_x]) @@ -833,6 +834,7 @@ with_testing_aot_hybrid_default=no with_testing_aot_full_default=no with_winaot_default=no with_orbis_default=no +with_unreal_default=no with_bitcode_default=no with_cooperative_gc_default=no @@ -852,6 +854,7 @@ elif test x$with_runtime_preset = xall; then with_xammac_default=yes with_winaot_default=yes with_orbis_default=yes + with_unreal_default=yes elif test x$with_runtime_preset = xfullaot; then DISABLE_MCS_DOCS_default=yes with_testing_aot_full_default=yes @@ -922,6 +925,17 @@ elif test x$with_runtime_preset = xorbis; then AOT_BUILD_FLAGS="--runtime=mobile --aot=full,$INVARIANT_AOT_OPTIONS" AOT_RUN_FLAGS="--runtime=mobile --full-aot" +elif test x$with_runtime_preset = xunreal; then + DISABLE_MCS_DOCS_default=yes + with_unreal_default=yes + TEST_PROFILE=ounreal + + mono_feature_disable_com='yes' + mono_feature_disable_remoting='yes' + mono_feature_disable_appdomains='yes' + + AOT_BUILD_FLAGS="--runtime=mobile --aot=hybrid,$INVARIANT_AOT_OPTIONS" + AOT_RUN_FLAGS="--runtime=mobile --hybrid-aot" else with_profile4_x_default=yes fi @@ -968,6 +982,9 @@ fi if test "x$with_orbis" = "xdefault"; then with_orbis=$with_orbis_default fi +if test "x$with_unreal" = "xdefault"; then + with_unreal=$with_unreal_default +fi AM_CONDITIONAL(INSTALL_4_x, [test "x$with_profile4_x" = "xyes"]) @@ -981,8 +998,9 @@ AM_CONDITIONAL(INSTALL_TESTING_AOT_HYBRID, [test "x$with_testing_aot_hybrid" != AM_CONDITIONAL(INSTALL_TESTING_AOT_FULL, [test "x$with_testing_aot_full" != "xno"]) AM_CONDITIONAL(INSTALL_WINAOT, [test "x$with_winaot" != "xno"]) AM_CONDITIONAL(INSTALL_ORBIS, [test "x$with_orbis" != "xno"]) +AM_CONDITIONAL(INSTALL_UNREAL, [test "x$with_unreal" != "xno"]) AM_CONDITIONAL(FULL_AOT_TESTS, [test "x$TEST_PROFILE" = "xtesting_aot_full"] || [test "x$TEST_PROFILE" = "xwinaot"] || [test "x$TEST_PROFILE" = "xorbis"]) -AM_CONDITIONAL(HYBRID_AOT_TESTS, [test "x$TEST_PROFILE" = "xtesting_aot_hybrid"]) +AM_CONDITIONAL(HYBRID_AOT_TESTS, [test "x$TEST_PROFILE" = "xtesting_aot_hybrid"] || [test "x$TEST_PROFILE" = "xunreal"]) default_profile=net_4_x if test -z "$INSTALL_MONODROID_TRUE"; then : @@ -1006,6 +1024,9 @@ fi if test -z "$INSTALL_ORBIS_TRUE"; then : default_profile=orbis fi +if test -z "$INSTALL_UNREAL_TRUE"; then : + default_profile=unreal +fi if test -z "$INSTALL_4_x_TRUE"; then : default_profile=net_4_x fi @@ -4557,6 +4578,7 @@ echo " Xamarin.Mac: $with_xammac Windows AOT: $with_winaot Orbis: $with_orbis + Unreal: $with_unreal Test profiles: AOT Full ($with_testing_aot_full), AOT Hybrid ($with_testing_aot_hybrid) JNI support: $jdk_headers_found libgdiplus: $libgdiplus_msg diff --git a/mcs/Makefile b/mcs/Makefile index 1d76f3fc0e1..ea121b9459e 100644 --- a/mcs/Makefile +++ b/mcs/Makefile @@ -23,6 +23,7 @@ xbuild_12_SUBDIRS := build class tools/xbuild xbuild_14_SUBDIRS := build class tools/xbuild winaot_SUBDIRS := build class orbis_SUBDIRS := build class +unreal_SUBDIRS := build class include build/rules.make @@ -77,6 +78,7 @@ $(_boot_:%=profile-do--testing_aot_hybrid--%): profile-do--testing_aot_hy $(_boot_:%=profile-do--testing_aot_full--%): profile-do--testing_aot_full--%: profile-do--build--% $(_boot_:%=profile-do--winaot--%): profile-do--winaot--%: profile-do--build--% $(_boot_:%=profile-do--orbis--%): profile-do--orbis--%: profile-do--build--% +$(_boot_:%=profile-do--unreal--%): profile-do--unreal--%: profile-do--build--% $(_boot_:%=profile-do--build--%): profile-do--build--%: profile-do--basic--% testcorlib: diff --git a/mcs/build/profiles/unreal.make b/mcs/build/profiles/unreal.make new file mode 100644 index 00000000000..5a3cfc3930e --- /dev/null +++ b/mcs/build/profiles/unreal.make @@ -0,0 +1,33 @@ +#! -*- makefile -*- + +BOOTSTRAP_PROFILE = build + +BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_CSC) +MCS = $(BOOTSTRAP_MCS) + +profile-check: + @: + +DEFAULT_REFERENCES = -r:$(topdir)/class/lib/$(PROFILE)/mscorlib.dll + +PROFILE_MCS_FLAGS = \ + -d:NET_1_1 \ + -d:NET_2_0 \ + -d:NET_2_1 \ + -d:MOBILE \ + -d:MOBILE_DYNAMIC \ + -d:NET_3_5 \ + -d:NET_4_0 \ + -d:NET_4_5 \ + -d:MONO \ + -nowarn:1699 \ + -nostdlib \ + $(DEFAULT_REFERENCES) \ + $(PLATFORM_DEBUG_FLAGS) + +FRAMEWORK_VERSION = 2.1 + +NO_INSTALL = yes +MOBILE_DYNAMIC = yes +MOBILE_PROFILE = yes +NO_CONSOLE = yes diff --git a/mcs/class/Facades/System.Drawing.Primitives/Makefile b/mcs/class/Facades/System.Drawing.Primitives/Makefile index 1295d05c323..0ef7aa55d0c 100644 --- a/mcs/class/Facades/System.Drawing.Primitives/Makefile +++ b/mcs/class/Facades/System.Drawing.Primitives/Makefile @@ -23,7 +23,7 @@ EMBEDDED_DRAWING_DEP := $(filter xammac_net_4_5 testing_aot_full testing_aot_hyb ifndef EMBEDDED_DRAWING_DEP # profiles which build a System.Drawing.dll in the repo -REPO_DRAWING_DEP := $(filter net_4_x orbis winaot, $(PROFILE)) +REPO_DRAWING_DEP := $(filter net_4_x orbis winaot unreal, $(PROFILE)) ifdef REPO_DRAWING_DEP LIB_REFS += System.Drawing diff --git a/mcs/class/Facades/netstandard/Makefile b/mcs/class/Facades/netstandard/Makefile index fd6e24e65bc..1ea58dbfe7e 100644 --- a/mcs/class/Facades/netstandard/Makefile +++ b/mcs/class/Facades/netstandard/Makefile @@ -29,7 +29,7 @@ LIB_REFS += System.Web endif # profiles which build a System.Drawing.dll in the repo -REPO_DRAWING_DEP := $(filter net_4_x orbis winaot, $(PROFILE)) +REPO_DRAWING_DEP := $(filter net_4_x orbis winaot unreal, $(PROFILE)) ifdef REPO_DRAWING_DEP LIB_REFS += System.Drawing diff --git a/mcs/class/Facades/subdirs.make b/mcs/class/Facades/subdirs.make index d1dd9c4f6b9..0d015c1eb82 100644 --- a/mcs/class/Facades/subdirs.make +++ b/mcs/class/Facades/subdirs.make @@ -83,6 +83,9 @@ winaot_PARALLEL_SUBDIRS = $(common_SUBDIRS) $(mobile_only_SUBDIRS) orbis_SUBDIRS = $(common_DEPS_SUBDIRS) $(netstandard_drawing_SUBDIRS) $(mobile_only_DEPS_SUBDIRS) orbis_PARALLEL_SUBDIRS = $(common_SUBDIRS) $(mobile_only_SUBDIRS) +unreal_SUBDIRS = $(common_DEPS_SUBDIRS) $(netstandard_drawing_SUBDIRS) $(mobile_only_DEPS_SUBDIRS) +unreal_PARALLEL_SUBDIRS = $(common_SUBDIRS) $(mobile_only_SUBDIRS) + mobile_only_SUBDIRS = System.Net.Ping System.Runtime.Serialization.Formatters System.Security.Cryptography.Csp System.Security.Cryptography.Pkcs \ System.Security.Cryptography.Cng System.Runtime.Loader System.Xml.XPath.XmlDocument System.Reflection.DispatchProxy diff --git a/mcs/class/Makefile b/mcs/class/Makefile index 56e2faaf458..1f390d66641 100644 --- a/mcs/class/Makefile +++ b/mcs/class/Makefile @@ -130,6 +130,11 @@ winaot_dirs := \ System.Drawing \ $(pcl_facade_dirs) +unreal_dirs := \ + $(mobile_common_dirs) \ + System.Drawing \ + $(pcl_facade_dirs) + xammac_4_5_dirs := \ corlib \ Mono.Security \ @@ -353,10 +358,11 @@ xbuild_12_SUBDIRS := $(xbuild_4_0_dirs) xbuild_14_SUBDIRS := $(xbuild_4_0_dirs) Microsoft.NuGet.Build.Tasks winaot_SUBDIRS := $(winaot_dirs) orbis_SUBDIRS := $(orbis_dirs) +unreal_SUBDIRS := $(unreal_dirs) include ../build/rules.make -SUBDIRS = $(testing_aot_full_dirs) $(testing_aot_hybrid_dirs) $(monotouch_dirs) $(monodroid_dirs) $(xammac_dirs) $(net_4_x_dirs) $(net_4_x_parallel_dirs) $(xammac_net_4_5_SUBDIRS) +SUBDIRS = $(testing_aot_full_dirs) $(testing_aot_hybrid_dirs) $(monotouch_dirs) $(monodroid_dirs) $(xammac_dirs) $(net_4_x_dirs) $(net_4_x_parallel_dirs) $(xammac_net_4_5_SUBDIRS) $(unreal_dirs) DIST_ONLY_SUBDIRS = dlr aot-compiler reference-assemblies $(xbuild_4_0_dirs) Microsoft.NuGet.Build.Tasks diff --git a/mcs/class/System.Core/unreal_System.Core.dll.sources b/mcs/class/System.Core/unreal_System.Core.dll.sources new file mode 100644 index 00000000000..c1ff8331787 --- /dev/null +++ b/mcs/class/System.Core/unreal_System.Core.dll.sources @@ -0,0 +1,14 @@ +#include common_System.Core.dll.sources +#include dynamic_System.Core.dll.sources + +System.Security.Cryptography/AesCryptoServiceProvider.cs +System.Security.Cryptography/AesTransform.cs +System.Security.Cryptography/MD5Cng.cs +System.Security.Cryptography/SHA1Cng.cs +System.Security.Cryptography/SHA256Cng.cs +System.Security.Cryptography/SHA384Cng.cs +System.Security.Cryptography/SHA512Cng.cs + +../referencesource/System.Core/System/Security/Cryptography/AesManaged.cs +../referencesource/System.Core/System/Security/Cryptography/ECDiffieHellman.cs +../referencesource/System.Core/System/Security/Cryptography/ECKeyXmlFormat.cs diff --git a/mcs/class/System.Data/unreal_System.Data.dll.sources b/mcs/class/System.Data/unreal_System.Data.dll.sources new file mode 100644 index 00000000000..bbc860b8cd7 --- /dev/null +++ b/mcs/class/System.Data/unreal_System.Data.dll.sources @@ -0,0 +1 @@ +#include mobile_System.Data.dll.sources diff --git a/mcs/class/System.Drawing/Makefile b/mcs/class/System.Drawing/Makefile index 19d734e166c..685b8fb6d80 100644 --- a/mcs/class/System.Drawing/Makefile +++ b/mcs/class/System.Drawing/Makefile @@ -12,9 +12,9 @@ LIB_MCS_FLAGS = /unsafe \ RESX_RESOURCE_STRING = ../../../external/corefx/src/System.Drawing.Common/src/Resources/Strings.resx -ifeq (winaot, $(PROFILE)) -LIB_MCS_FLAGS += /keyfile:../msfinal.pub -else ifeq (orbis, $(PROFILE)) +MOBILE_LIKE := $(filter winaot orbis unreal, $(PROFILE)) + +ifdef MOBILE_LIKE LIB_MCS_FLAGS += /keyfile:../msfinal.pub else LIB_MCS_FLAGS += -d:FEATURE_TYPECONVERTER,SUPPORTS_WINDOWS_COLORS diff --git a/mcs/class/System.IdentityModel/unreal_System.IdentityModel.dll.sources b/mcs/class/System.IdentityModel/unreal_System.IdentityModel.dll.sources new file mode 100644 index 00000000000..429636751c2 --- /dev/null +++ b/mcs/class/System.IdentityModel/unreal_System.IdentityModel.dll.sources @@ -0,0 +1 @@ +#include mobile_System.IdentityModel.dll.sources diff --git a/mcs/class/System.Runtime.Serialization/unreal_System.Runtime.Serialization.dll.sources b/mcs/class/System.Runtime.Serialization/unreal_System.Runtime.Serialization.dll.sources new file mode 100644 index 00000000000..6caafd41198 --- /dev/null +++ b/mcs/class/System.Runtime.Serialization/unreal_System.Runtime.Serialization.dll.sources @@ -0,0 +1 @@ +#include mobile_System.Runtime.Serialization.dll.sources diff --git a/mcs/class/System.ServiceModel.Web/unreal_System.ServiceModel.Web.dll.sources b/mcs/class/System.ServiceModel.Web/unreal_System.ServiceModel.Web.dll.sources new file mode 100644 index 00000000000..cbea0fae7b4 --- /dev/null +++ b/mcs/class/System.ServiceModel.Web/unreal_System.ServiceModel.Web.dll.sources @@ -0,0 +1 @@ +#include mobile_System.ServiceModel.Web.dll.sources diff --git a/mcs/class/System.ServiceModel/unreal_System.ServiceModel.dll.sources b/mcs/class/System.ServiceModel/unreal_System.ServiceModel.dll.sources new file mode 100644 index 00000000000..22ece5ce8ce --- /dev/null +++ b/mcs/class/System.ServiceModel/unreal_System.ServiceModel.dll.sources @@ -0,0 +1 @@ +#include mobile_System.ServiceModel.dll.sources diff --git a/mcs/class/System.Web.Services/unreal_System.Web.Services.dll.sources b/mcs/class/System.Web.Services/unreal_System.Web.Services.dll.sources new file mode 100644 index 00000000000..9e39dcc73b1 --- /dev/null +++ b/mcs/class/System.Web.Services/unreal_System.Web.Services.dll.sources @@ -0,0 +1 @@ +#include mobile_System.Web.Services.dll.sources diff --git a/mcs/class/System.XML/unreal_System.Xml.dll.sources b/mcs/class/System.XML/unreal_System.Xml.dll.sources new file mode 100644 index 00000000000..b6630930f75 --- /dev/null +++ b/mcs/class/System.XML/unreal_System.Xml.dll.sources @@ -0,0 +1 @@ +#include mobile_System.Xml.dll.sources diff --git a/mcs/class/System/unreal_System.dll.sources b/mcs/class/System/unreal_System.dll.sources new file mode 100644 index 00000000000..70a77a6dbff --- /dev/null +++ b/mcs/class/System/unreal_System.dll.sources @@ -0,0 +1 @@ +#include mobile_System.dll.sources -- 2.25.1