Updates for winaot profile
authorHenric Müller <hemuller@microsoft.com>
Thu, 22 Dec 2016 13:34:55 +0000 (14:34 +0100)
committerHenric Müller <hemuller@microsoft.com>
Wed, 25 Jan 2017 09:14:01 +0000 (10:14 +0100)
configure.ac
mcs/build/rules.make
mcs/class/System/winaot_System_test.dll.exclude.sources [new file with mode: 0755]
mcs/class/corlib/winaot_corlib_test.dll.exclude.sources [new file with mode: 0644]
mcs/class/corlib/winaot_corlib_test.dll.sources [new file with mode: 0755]
mono/mini/Makefile.am.in
mono/tests/Makefile.am
mono/tests/assemblyresolve/Makefile.am
runtime/Makefile.am

index 742bc4c35406ab6c7d9d4096a0a5978c14293580..9edb5ed18294ea1093d476cf215b2e1770556905 100644 (file)
@@ -895,6 +895,19 @@ elif test x$with_runtime_preset = xaot; then
    AOT_RUN_FLAGS=""
 
    DISABLE_MCS_DOCS_default=yes
+elif test x$with_runtime_preset = xwinaot; then
+   DISABLE_MCS_DOCS_default=yes
+   with_winaot_default=yes
+   TEST_PROFILE=winaot
+
+   mono_feature_disable_com='yes'
+   mono_feature_disable_remoting='yes'
+   mono_feature_disable_reflection_emit_save='yes'
+   mono_feature_disable_reflection_emit='yes'
+   mono_feature_disable_appdomains='yes'
+
+   AOT_BUILD_FLAGS="--aot=full,$INVARIANT_AOT_OPTIONS"
+   AOT_RUN_FLAGS="--full-aot"
 else
    with_profile4_x_default=yes
 fi
@@ -954,6 +967,7 @@ 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(FULL_AOT_TESTS, [test "x$with_testing_aot_full" != "xno"] || [test "x$with_winaot" != "xno"])
 
 AC_SUBST(INSTALL_TESTING_AOT_HYBRID)
 AC_SUBST(INSTALL_TESTING_AOT_FULL)
@@ -974,6 +988,9 @@ fi
 if test -z "$INSTALL_TESTING_AOT_FULL_TRUE"; then :
    default_profile=testing_aot_full
 fi
+if test -z "$INSTALL_WINAOT_TRUE"; then :
+   default_profile=winaot
+fi
 if test -z "$INSTALL_4_x_TRUE"; then :
    default_profile=net_4_x
 fi
index 46a34d7c03a759d0a0e436a664ce07e641ec2daa..561b42bda894643e995ca526c68bd7a93f37d05c 100644 (file)
@@ -188,11 +188,6 @@ ifneq ("$(wildcard $(topdir)/class/lib/$(PROFILE))","")
 
 AOT_PROFILE_ASSEMBLIES := $(sort $(patsubst .//%,%,$(filter-out %.dll.dll %.exe.dll %bare% %plaincore% %secxml% %Facades% %ilasm%,$(filter %.dll %.exe,$(wildcard $(topdir)/class/lib/$(PROFILE)/*)))))
 
-debug:
-       @echo AOT_PROFILE_ASSEMBLIES=$(AOT_PROFILE_ASSEMBLIES)
-       @echo
-       @echo $(patsubst %,%$(PLATFORM_AOT_SUFFIX),$(AOT_PROFILE_ASSEMBLIES))
-
 # This can run in parallel
 .PHONY: aot-all-profile
 aot-all-profile: $(patsubst %,%$(PLATFORM_AOT_SUFFIX),$(AOT_PROFILE_ASSEMBLIES))
diff --git a/mcs/class/System/winaot_System_test.dll.exclude.sources b/mcs/class/System/winaot_System_test.dll.exclude.sources
new file mode 100755 (executable)
index 0000000..9e03896
--- /dev/null
@@ -0,0 +1 @@
+#include testing_aot_full_System_test.dll.exclude.sources
diff --git a/mcs/class/corlib/winaot_corlib_test.dll.exclude.sources b/mcs/class/corlib/winaot_corlib_test.dll.exclude.sources
new file mode 100644 (file)
index 0000000..b4f123c
--- /dev/null
@@ -0,0 +1 @@
+#include testing_aot_full_corlib_test.dll.exclude.sources
diff --git a/mcs/class/corlib/winaot_corlib_test.dll.sources b/mcs/class/corlib/winaot_corlib_test.dll.sources
new file mode 100755 (executable)
index 0000000..011effe
--- /dev/null
@@ -0,0 +1 @@
+#include corlib_test.dll.sources
index 4f1e38b0735c72f4e22df2c2802735b617ac1301..7066f019a3210878cc5b956ff5bf129f56649710 100755 (executable)
@@ -501,7 +501,7 @@ test_sources =                      \
 regtests_UNIVERSAL=basic.exe basic-float.exe basic-long.exe basic-calls.exe objects.exe arrays.exe basic-math.exe exceptions.exe iltests.exe devirtualization.exe generics.exe basic-simd.exe basic-vectors.exe
 iregtests=basic.exe basic-float.exe basic-long.exe basic-calls.exe
 
-if INSTALL_TESTING_AOT_FULL
+if FULL_AOT_TESTS
 regtests= \
        $(regtests_UNIVERSAL)
 
@@ -513,7 +513,7 @@ endif
 else
 regtests= \
        $(regtests_UNIVERSAL) \
-       $(regtests_TESTING_AOT_FULL_BLACKLIST)
+       $(regtests_FULL_AOT_TESTS_BLACKLIST)
 endif
 
 if X86
@@ -759,9 +759,9 @@ gsharedvtcheck:
 fullaot_regtests = $(regtests) aot-tests.exe $(if $(GSHAREDVT),gshared.exe)
 
 # Skip aoting the tests that aren't compiled 
-# on the testing_aot_full profile because they're skipped
+# on the full aot profiles because they're skipped
 # on mobile profiles
-FULLAOT_LIBS_TESTING_AOT_FULL_BLACKLIST = \
+FULLAOT_LIBS_FULL_AOT_TESTS_BLACKLIST = \
        Mono.Posix.dll \
        System.Configuration.dll
 
@@ -776,13 +776,13 @@ FULLAOT_LIBS_UNIVERSAL = \
        System.Numerics.dll \
        System.Numerics.Vectors.dll
 
-if INSTALL_TESTING_AOT_FULL
+if FULL_AOT_TESTS
 FULLAOT_LIBS= \
        $(FULLAOT_LIBS_UNIVERSAL)
 else
 FULLAOT_LIBS= \
        $(FULLAOT_LIBS_UNIVERSAL) \
-       $(FULLAOT_LIBS_TESTING_AOT_FULL_BLACKLIST)
+       $(FULLAOT_LIBS_FULL_AOT_TESTS_BLACKLIST)
 endif
 
 FULLAOT_TMP_DIR=$(top_builddir)/mono/mini/fullaot-tmp
index 1fb49280a075f40222265663636f3351d9f67998..f15617fd09c0c940d01f07391c4fa1e2b49ec99d 100644 (file)
@@ -1,6 +1,6 @@
 SUBDIRS = assemblyresolve gc-descriptors
 
-if INSTALL_TESTING_AOT_FULL
+if FULL_AOT_TESTS
 FEATUREFUL_RUNTIME_TEST =  
 else
 FEATUREFUL_RUNTIME_TEST = test-appdomain-unload
@@ -47,7 +47,7 @@ MKBUNDLE = \
        PKG_CONFIG_PATH=$(top_builddir):$(PKG_CONFIG_PATH) \
        $(RUNTIME) $(CLASS)/mkbundle.exe
 
-if INSTALL_TESTING_AOT_FULL
+if FULL_AOT_TESTS
 PROFILE_MCS_FLAGS = -d:MOBILE,MOBILE_LEGACY,FULL_AOT_DESKTOP 
 endif
 
@@ -65,7 +65,7 @@ MCS = $(MCS_NO_LIB) -lib:$(CLASS)
 
 ILASM = $(TOOLS_RUNTIME) $(mcs_topdir)/class/lib/build/ilasm.exe
 
-if INSTALL_TESTING_AOT_FULL
+if FULL_AOT_TESTS
 TEST_RUNNER = ./test-runner.exe --runtime $(top_builddir)/runtime/mono-wrapper --mono-path "$(CLASS)" --aot-run-flags "$(AOT_RUN_FLAGS)" --aot-build-flags "$(AOT_BUILD_FLAGS)"
 else
 TEST_RUNNER = ./test-runner.exe --runtime $(top_builddir)/runtime/mono-wrapper --mono-path "$(CLASS)"
@@ -714,7 +714,7 @@ endif
 
 PROFILE_DISABLED_TESTS=
 
-if INSTALL_TESTING_AOT_FULL
+if FULL_AOT_TESTS
 # Tests which rely on TypeLoadExceptions
 # In full-aot mode, these cause the relevant methods to be not AOTed.
 PROFILE_DISABLED_TESTS += \
@@ -922,13 +922,13 @@ EXTRA_DIST=test-driver test-runner.cs $(TEST_CS_SRC_DIST) $(TEST_IL_SRC) \
 %.exe: %.il
        $(ILASM) -out:$@ $<
 
-if !INSTALL_TESTING_AOT_FULL
+if !FULL_AOT_TESTS
 if !INSTALL_TESTING_AOT_HYBRID
 TEST_DRIVER_HARD_KILL_FEATURE=-r:Mono.Posix.dll
 endif
 endif
 
-if INSTALL_TESTING_AOT_FULL
+if FULL_AOT_TESTS
 TEST_DRIVER_DEPEND=TestDriver.dll$(PLATFORM_AOT_SUFFIX)
 else
 TEST_DRIVER_DEPEND=TestDriver.dll
@@ -981,7 +981,7 @@ bug-81466-lib.dll$(PLATFORM_AOT_SUFFIX)     \
 TestingReferenceAssembly.dll$(PLATFORM_AOT_SUFFIX)     \
 TestingReferenceReferenceAssembly.dll$(PLATFORM_AOT_SUFFIX)
 
-if INSTALL_TESTING_AOT_FULL
+if FULL_AOT_TESTS
 prereqs: $(PREREQSI_IL_AOT) $(PREREQSI_CS_AOT) $(AOT_EXTRA_LIBS)
 else
 prereqs: $(PREREQSI_IL) $(PREREQSI_CS)
@@ -1026,7 +1026,7 @@ test-sgen : sgen-tests
 # Precompile the test assemblies in parallel
 compile-tests:
        $(MAKE) -j4 $(TESTSI_CS) $(TESTSI_IL) $(TESTBS) libtest.la $(PREREQSI_IL) $(PREREQSI_CS)
-if INSTALL_TESTING_AOT_FULL
+if FULL_AOT_TESTS
        $(MAKE) $(PREREQSI_IL_AOT) $(PREREQSI_CS_AOT) $(AOT_EXTRA_LIBS)
 endif
 
@@ -1235,7 +1235,7 @@ SGEN_REGULAR_TESTS_SRC =  \
 
 SGEN_REGULAR_DISABLED_TESTS=
 
-if INSTALL_TESTING_AOT_FULL
+if FULL_AOT_TESTS
 SGEN_REGULAR_DISABLED_TESTS += \
        sgen-domain-unload.exe  \
        sgen-domain-unload-2.exe
@@ -1448,7 +1448,7 @@ imt_big_iface_test.exe: $(TEST_DRIVER_DEPEND) make-imt-test.exe
 EXTRA_DIST += test-inline-call-stack-library.cs test-inline-call-stack.cs
 test-inline-call-stack-library.dll: $(TEST_DRIVER_DEPEND) $(srcdir)/test-inline-call-stack-library.cs
        $(MCS) -t:library -out:test-inline-call-stack-library.dll $(srcdir)/test-inline-call-stack-library.cs
-if INSTALL_TESTING_AOT_FULL
+if FULL_AOT_TESTS
        $(RUNTIME) $(AOT_BUILD_FLAGS) $@
 endif
 
@@ -1495,7 +1495,7 @@ bug-81673.exe bug-81673-interface.dll: $(srcdir)/bug-81673.cs $(srcdir)/bug-8167
        $(MCS) -target:library -out:bug-81673-interface.dll $(srcdir)/bug-81673-interface.cs
        $(MCS) -out:bug-81673.exe -r:bug-81673-interface.dll $(srcdir)/bug-81673.cs
        $(MCS) -define:WITH_STOP -target:library -out:bug-81673-interface.dll $(srcdir)/bug-81673-interface.cs
-if INSTALL_TESTING_AOT_FULL
+if FULL_AOT_TESTS
        $(RUNTIME) $(AOT_BUILD_FLAGS) $@
 endif
 
@@ -1504,7 +1504,7 @@ bug-36848.exe bug-36848-a.dll: $(srcdir)/bug-36848.cs $(srcdir)/bug-36848-a.cs
        $(MCS) -target:library -out:bug-36848-a.dll $(srcdir)/bug-36848-a.cs
        $(MCS) -r:bug-36848-a.dll -out:bug-36848.exe $(srcdir)/bug-36848.cs
        $(MCS) -target:library -out:bug-36848-a.dll $(srcdir)/bug-36848-a.cs /define:WITH_STOP
-if INSTALL_TESTING_AOT_FULL
+if FULL_AOT_TESTS
        $(RUNTIME) $(AOT_BUILD_FLAGS) $@
 endif
 
@@ -1519,7 +1519,7 @@ bug-81691.exe: bug-81691-b.dll
 EXTRA_DIST += bug-81466-lib.il
 bug-81466-lib.dll: bug-81466-lib.il
        $(ILASM) /dll /output:bug-81466-lib.dll $(srcdir)/bug-81466-lib.il
-if INSTALL_TESTING_AOT_FULL
+if FULL_AOT_TESTS
        $(RUNTIME) $(AOT_BUILD_FLAGS) $@
 endif
 bug-81466.exe: bug-81466.il bug-81466-lib.dll
@@ -1528,7 +1528,7 @@ bug-81466.exe: bug-81466.il bug-81466-lib.dll
 EXTRA_DIST += bug-324535-il.il
 bug-324535-il.dll : bug-324535-il.il
        $(ILASM) /dll /output:bug-324535-il.dll $(srcdir)/bug-324535-il.il
-if INSTALL_TESTING_AOT_FULL
+if FULL_AOT_TESTS
        $(RUNTIME) $(AOT_BUILD_FLAGS) $@
 endif
 bug-324535.exe : bug-324535.cs bug-324535-il.dll
@@ -1537,7 +1537,7 @@ bug-324535.exe : bug-324535.cs bug-324535-il.dll
 EXTRA_DIST += custom-modifiers.2.cs custom-modifiers-lib.il
 custom-modifiers-lib.dll: custom-modifiers-lib.il
        $(ILASM) /dll /output:custom-modifiers-lib.dll $(srcdir)/custom-modifiers-lib.il
-if INSTALL_TESTING_AOT_FULL
+if FULL_AOT_TESTS
        $(RUNTIME) $(AOT_BUILD_FLAGS) $@
 endif
 custom-modifiers.2.exe: custom-modifiers.2.cs custom-modifiers-lib.dll
@@ -1546,7 +1546,7 @@ custom-modifiers.2.exe: custom-modifiers.2.cs custom-modifiers-lib.dll
 EXTRA_DIST += bug-382986-lib.cs
 bug-382986-lib.dll: bug-382986-lib.cs
        $(MCS) -target:library -out:$@ $(srcdir)/bug-382986-lib.cs
-if INSTALL_TESTING_AOT_FULL
+if FULL_AOT_TESTS
        $(RUNTIME) $(AOT_BUILD_FLAGS) $@
 endif
 
@@ -1573,14 +1573,14 @@ test-coreclr-security : coreclr-security.exe
 EXTRA_DIST += generic-unboxing.2.il
 generic-unboxing.2.dll : generic-unboxing.2.il
        $(ILASM) /dll /output:generic-unboxing.2.dll $(srcdir)/generic-unboxing.2.il
-if INSTALL_TESTING_AOT_FULL
+if FULL_AOT_TESTS
        $(RUNTIME) $(AOT_BUILD_FLAGS) $@
 endif
 
 EXTRA_DIST += generic-boxing.2.il
 generic-boxing.2.dll : generic-boxing.2.il generic-unboxing.2.dll
        $(ILASM) /dll /output:generic-boxing.2.dll $(srcdir)/generic-boxing.2.il
-if INSTALL_TESTING_AOT_FULL
+if FULL_AOT_TESTS
        $(RUNTIME) $(AOT_BUILD_FLAGS) $@
 endif
 
@@ -1595,7 +1595,7 @@ generic-box.2.exe : generic-box.2.cs generic-unboxing.2.dll generic-boxing.2.dll
 EXTRA_DIST += generic-delegate2.2.cs generic-delegate2-lib.2.il
 generic-delegate2-lib.2.dll : generic-delegate2-lib.2.il
        $(ILASM) /dll /output:$@ $(srcdir)/generic-delegate2-lib.2.il
-if INSTALL_TESTING_AOT_FULL
+if FULL_AOT_TESTS
        $(RUNTIME) $(AOT_BUILD_FLAGS) $@
 endif
 generic-delegate2.2.exe : generic-delegate2.2.cs generic-delegate2-lib.2.dll
@@ -1666,7 +1666,7 @@ GSHARED_TESTS_SRC = \
 
 GSHARED_DISABLED_TESTS=
 
-if INSTALL_TESTING_AOT_FULL
+if FULL_AOT_TESTS
 GSHARED_DISABLED_TESTS += \
        generic-type-builder.2.exe
 endif
index 12379c115f22ab5495ff9b5250bc9d8d795ccfe0..ba66ec78c7461a48115eaa3b911c57aaecbfdc73 100644 (file)
@@ -2,7 +2,7 @@
 RUNTIME = $(top_builddir)/runtime/mono-wrapper --debug
 MCS = MONO_PATH=$(mcs_topdir)/class/lib/build $(RUNTIME) $(CSC) -noconfig -nologo -debug:portable -target:library
 
-if INSTALL_TESTING_AOT_FULL
+if FULL_AOT_TESTS
 prereq: aot
 else
 prereq: test/asm.dll
index 8e0985795429ad0c2bbdd272fdcfb37b1d0f39a4..b540ee13f009dc7877f26c120cb2169ad3430e42 100644 (file)
@@ -56,6 +56,10 @@ if INSTALL_TESTING_AOT_FULL
 build_profiles += testing_aot_full
 endif
 
+if INSTALL_WINAOT
+build_profiles += winaot
+endif
+
 if INSTALL_XAMMAC
 build_profiles += xammac xammac_net_4_5
 endif
@@ -117,20 +121,20 @@ cur_dir_cmd = pwd
 PLATFORM_PATH_SEPARATOR = :
 endif
 
-if INSTALL_TESTING_AOT_FULL
+if FULL_AOT_TESTS
 #  ILASM.exe has features which a testing_aot_full runtime will not support.
 #  It is invoked with an external mono when used in the runtime.
 #  We skip it here because otherwise it will fail to verify.
-TESTING_AOT_FULL_FILTER=grep -v ilasm
+FULL_AOT_TESTS_FILTER=grep -v ilasm
 else
-TESTING_AOT_FULL_FILTER=echo
+FULL_AOT_TESTS_FILTER=echo
 endif
 
 # Compile all assemblies with the verifier turned on. Code must be valid but not verifiable.
 # TODO it would be nice to split assemblies without unsafe code to use the verifier with verifiable mode.
 # Skip binary_reference_assemblies because they contain metadata only
 mcs-compileall: mono-wrapper etc/mono/config
-       export verifiable_files=`ls "$(mcs_topdir)/class/lib/$$profile/" | grep -E '\.(dll|exe)$$' | $(TESTING_AOT_FULL_FILTER)` ; \
+       export verifiable_files=`ls "$(mcs_topdir)/class/lib/$$profile/" | grep -E '\.(dll|exe)$$' | $(FULL_AOT_TESTS_FILTER)` ; \
        save_MONO_PATH=$$MONO_PATH; mcs_topdir=`cd $(mcs_topdir) && $(cur_dir_cmd)`; ok=:; \
        for profile in $(test_profiles); do \
          if [ "binary_reference_assemblies" = "$$profile" ]; then \