diff options
-rw-r--r-- | configure.ac | 46 | ||||
-rw-r--r-- | mcs/class/System/testing_aot_hybrid_System.dll.sources | 4 | ||||
-rw-r--r-- | mono/mini/aot-compiler.c | 13 | ||||
-rw-r--r-- | mono/tests/.gitignore | 5 | ||||
-rwxr-xr-x | mono/tests/Makefile.am | 18 | ||||
-rw-r--r-- | runtime/Makefile.am | 2 | ||||
-rwxr-xr-x | scripts/ci/run-jenkins.sh | 18 |
7 files changed, 76 insertions, 30 deletions
diff --git a/configure.ac b/configure.ac index c403d3dfdc9..62e121154e4 100644 --- a/configure.ac +++ b/configure.ac @@ -997,7 +997,7 @@ AC_ARG_WITH(unreal, [ --with-unreal=yes,no If you w AC_ARG_WITH(wasm, [ --with-wasm=yes,no If you want to build the WebAssembly (defaults to no)], [], [with_wasm=default]) -AC_ARG_WITH(runtime_preset, [ --with-runtime_preset=net_4_x,all,aot,hybridaot,fullaot,bitcode,unreal Which default profile to build (defaults to net_4_x)], [], [with_runtime_preset=net_4_x]) +AC_ARG_WITH(runtime-preset, [ --with-runtime-preset=net_4_x,all,aot,aot_llvm,hybridaot,hybridaot_llvm,fullaot,fullaot_llvm,bitcode,unreal Which default profile to build (defaults to net_4_x)], [], [with_runtime_preset=net_4_x]) AC_ARG_WITH(spectre-mitigation, [ --with-spectre-mitigation=yes,no If you want to build the runtime with compiler flags that enable Spectre mitigation (defaults to no)], [], [with_spectre_mitigation=default]) AC_ARG_WITH(spectre-indirect-branch-choice, [ --with-spectre-indirect-branch-choice=keep,thunk,inline,extern Convert indirect branches to the specified kind of thunk (defaults to inline)], [], [with_spectre_indirect_branch_choice=inline]) AC_ARG_WITH(spectre-function-return-choice, [ --with-spectre-function-return-choice=keep,thunk,inline,extern Convert function return instructions to the specified kind of thunk (defaults to inline)], [], [with_spectre_function_return_choice=inline]) @@ -1086,6 +1086,25 @@ elif test x$with_runtime_preset = xall; then with_orbis_default=yes with_unreal_default=yes with_wasm_default=yes + with_testing_aot_hybrid_default=yes + with_testing_aot_full_default=yes +elif test x$with_runtime_preset = xbitcode; then + DISABLE_MCS_DOCS_default=yes + with_testing_aot_full_default=yes + with_bitcode_default=yes + with_cooperative_gc_default=yes + TEST_PROFILE=testing_aot_full + enable_llvm_default=yes + + 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="--runtime=mobile --aot=llvmonly,$INVARIANT_AOT_OPTIONS" + AOT_RUN_FLAGS="--runtime=mobile --llvmonly" + AOT_MODE="llvmonly" elif test x$with_runtime_preset = xfullaot; then DISABLE_MCS_DOCS_default=yes with_testing_aot_full_default=yes @@ -1100,13 +1119,10 @@ elif test x$with_runtime_preset = xfullaot; then AOT_BUILD_FLAGS="--runtime=mobile -O=gsharedvt --aot=full,$INVARIANT_AOT_OPTIONS" AOT_RUN_FLAGS="--runtime=mobile --full-aot" AOT_MODE="full" -elif test x$with_runtime_preset = xbitcode; then +elif test x$with_runtime_preset = xfullaot_llvm; then DISABLE_MCS_DOCS_default=yes with_testing_aot_full_default=yes - with_bitcode_default=yes - with_cooperative_gc_default=yes TEST_PROFILE=testing_aot_full - enable_llvm_default=yes mono_feature_disable_com='yes' mono_feature_disable_remoting='yes' @@ -1114,9 +1130,9 @@ elif test x$with_runtime_preset = xbitcode; then mono_feature_disable_reflection_emit='yes' mono_feature_disable_appdomains='yes' - AOT_BUILD_FLAGS="--runtime=mobile --aot=llvmonly,$INVARIANT_AOT_OPTIONS" - AOT_RUN_FLAGS="--runtime=mobile --llvmonly" - AOT_MODE="llvmonly" + AOT_BUILD_FLAGS="--runtime=mobile -O=gsharedvt --llvm --aot=full,$INVARIANT_AOT_OPTIONS" + AOT_RUN_FLAGS="--runtime=mobile --full-aot" + AOT_MODE="full" elif test x$with_runtime_preset = xhybridaot; then DISABLE_MCS_DOCS_default=yes with_testing_aot_hybrid_default=yes @@ -1124,6 +1140,13 @@ elif test x$with_runtime_preset = xhybridaot; then AOT_BUILD_FLAGS="--runtime=mobile --aot=hybrid,$INVARIANT_AOT_OPTIONS" AOT_RUN_FLAGS="--runtime=mobile --hybrid-aot" +elif test x$with_runtime_preset = xhybridaot_llvm; then + DISABLE_MCS_DOCS_default=yes + with_testing_aot_hybrid_default=yes + TEST_PROFILE=testing_aot_hybrid + + AOT_BUILD_FLAGS="--runtime=mobile --llvm --aot=hybrid,$INVARIANT_AOT_OPTIONS" + AOT_RUN_FLAGS="--runtime=mobile --hybrid-aot" elif test x$with_runtime_preset = xaot; then with_profile4_x_default=yes @@ -1131,6 +1154,13 @@ elif test x$with_runtime_preset = xaot; then AOT_RUN_FLAGS="" DISABLE_MCS_DOCS_default=yes +elif test x$with_runtime_preset = xaot_llvm; then + with_profile4_x_default=yes + + AOT_BUILD_FLAGS="--llvm --aot=$INVARIANT_AOT_OPTIONS" + 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 diff --git a/mcs/class/System/testing_aot_hybrid_System.dll.sources b/mcs/class/System/testing_aot_hybrid_System.dll.sources index 70a77a6dbff..88ccfbb3572 100644 --- a/mcs/class/System/testing_aot_hybrid_System.dll.sources +++ b/mcs/class/System/testing_aot_hybrid_System.dll.sources @@ -1 +1,5 @@ #include mobile_System.dll.sources + +../../../external/corefx/src/System.Text.RegularExpressions/src/System/Text/RegularExpressions/CompiledRegexRunnerFactory.cs +../../../external/corefx/src/System.Text.RegularExpressions/src/System/Text/RegularExpressions/RegexCompiler.cs +../../../external/corefx/src/System.Text.RegularExpressions/src/System/Text/RegularExpressions/RegexLWCGCompiler.cs diff --git a/mono/mini/aot-compiler.c b/mono/mini/aot-compiler.c index daf44d4190c..fa9cfe66ecf 100644 --- a/mono/mini/aot-compiler.c +++ b/mono/mini/aot-compiler.c @@ -12738,13 +12738,20 @@ mono_compile_assembly (MonoAssembly *ass, guint32 opts, const char *aot_options, else acfg->llvm_sfile = g_strdup (acfg->aot_opts.llvm_outfile); } else { - acfg->tmpbasename = (strcmp (acfg->aot_opts.temp_path, "") == 0) ? - g_strdup_printf ("%s", "temp") : - g_build_filename (acfg->aot_opts.temp_path, "temp", NULL); + gchar *temp_path; + if (strcmp (acfg->aot_opts.temp_path, "") != 0) { + temp_path = g_strdup (acfg->aot_opts.temp_path); + } else { + temp_path = mkdtemp(g_strdup ("mono_aot_XXXXXX")); + g_assertf (temp_path, "mkdtemp failed, error = (%d) %s", errno, g_strerror (errno)); + } + acfg->tmpbasename = g_build_filename (temp_path, "temp", NULL); acfg->tmpfname = g_strdup_printf ("%s.s", acfg->tmpbasename); acfg->llvm_sfile = g_strdup_printf ("%s-llvm.s", acfg->tmpbasename); acfg->llvm_ofile = g_strdup_printf ("%s-llvm.o", acfg->tmpbasename); + + g_free (temp_path); } } #endif diff --git a/mono/tests/.gitignore b/mono/tests/.gitignore index aca4082ffb7..c2dc3ab9834 100644 --- a/mono/tests/.gitignore +++ b/mono/tests/.gitignore @@ -22,8 +22,8 @@ /*.o /*.lo /*.so -/*.dylib -/*.dylib.dSYM +**.dylib +**.dylib.dSYM /*.netmodule /imt_big_iface_test.cs /bin @@ -35,3 +35,4 @@ /testlist.sorted /reflection-load-dir /assemblyresolve_deps +/mono_aot_* diff --git a/mono/tests/Makefile.am b/mono/tests/Makefile.am index 32c7670c3be..38287b1b351 100755 --- a/mono/tests/Makefile.am +++ b/mono/tests/Makefile.am @@ -220,7 +220,15 @@ MCS = $(MCS_NO_LIB) ILASM = $(TOOLS_RUNTIME) $(mcs_topdir)/class/lib/build/ilasm.exe -TEST_RUNNER = ./test-runner.exe --runtime $(top_builddir)/runtime/mono-wrapper --mono-path "$(CLASS)" +TEST_RUNNER = ./test-runner.exe + +if HOST_WIN32 +TEST_RUNNER += --config tests-config --runtime "$(if $(MONO_EXECUTABLE),$(shell cygpath -w -a $(MONO_EXECUTABLE) | sed 's/\\/\\\\/g'),$(top_builddir)/runtime/mono-wrapper)" +else +TEST_RUNNER += --config tests-config --runtime "$(if $(MONO_EXECUTABLE),$(MONO_EXECUTABLE),$(top_builddir)/runtime/mono-wrapper)" +endif + +TEST_RUNNER += --mono-path "$(CLASS)" if FULL_AOT_TESTS TEST_RUNNER += --runtime-args "$(TEST_AOT_RUN_FLAGS)" @@ -230,11 +238,7 @@ if HYBRID_AOT_TESTS TEST_RUNNER += --runtime-args "$(TEST_AOT_RUN_FLAGS)" endif -if HOST_WIN32 -TEST_RUNNER += --config tests-config --runtime $(if $(MONO_EXECUTABLE),$(shell cygpath -w -a $(MONO_EXECUTABLE) | sed 's/\\/\\\\/g'),mono) -else -TEST_RUNNER += --config tests-config --runtime $(if $(MONO_EXECUTABLE),$(MONO_EXECUTABLE),mono) -endif +TEST_RUNNER += --runtime-args "$(TEST_RUNTIME_FLAGS)" TEST_RUNNER += $(if $(V), --verbose,) @@ -1508,7 +1512,7 @@ runtest: compile-tests fi runtest-managed: test-runner.exe compile-tests - $(TOOLS_RUNTIME) --debug $(TEST_RUNNER) -j a --testsuite-name "runtime" --timeout 300 --disabled "$(DISABLED_TESTS)" --runtime-args "$(TEST_RUNTIME_FLAGS)" $(TESTS_CS) $(TESTS_IL) $(TESTS_BENCH) + $(TOOLS_RUNTIME) --debug $(TEST_RUNNER) -j a --testsuite-name "runtime" --timeout 300 --disabled "$(DISABLED_TESTS)" $(TESTS_CS) $(TESTS_IL) $(TESTS_BENCH) runtest-managed-serial: test-runner.exe compile-tests $(TOOLS_RUNTIME) --debug $(TEST_RUNNER) -j 1 --testsuite-name "runtime" --disabled "$(DISABLED_TESTS)" $(TESTS_CS) $(TESTS_IL) $(TESTS_BENCH) diff --git a/runtime/Makefile.am b/runtime/Makefile.am index afd71832d23..fa204020146 100644 --- a/runtime/Makefile.am +++ b/runtime/Makefile.am @@ -9,7 +9,7 @@ if INSTALL_4_x symlinks += etc/mono/4.0/machine.config etc/mono/4.0/web.config etc/mono/4.5/web.config etc/mono/4.0/Browsers/Compat.browser etc/mono/4.5/Browsers/Compat.browser endif -# This is needed at least to build configure -with-runtime_preset=fullaot. +# This is needed at least to build configure --with-runtime-preset=fullaot. symlinks += etc/mono/4.5/machine.config etc/mono/2.0/machine.config: $(top_srcdir)/data/net_2_0/machine.config diff --git a/scripts/ci/run-jenkins.sh b/scripts/ci/run-jenkins.sh index 6c3e823b144..d0cc9fba277 100755 --- a/scripts/ci/run-jenkins.sh +++ b/scripts/ci/run-jenkins.sh @@ -48,18 +48,18 @@ if [[ ${CI_TAGS} == *'checked-all'* ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAG if [[ ${CI_TAGS} == *'mcs-compiler'* ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --with-csc=mcs"; fi if [[ ${CI_TAGS} == *'disable-mcs-build'* ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --disable-mcs-build"; fi -if [[ ${CI_TAGS} == *'fullaot_llvm'* ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --enable-llvm=yes --with-runtime_preset=fullaot "; -elif [[ ${CI_TAGS} == *'hybridaot_llvm'* ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --enable-llvm=yes --with-runtime_preset=hybridaot"; -elif [[ ${CI_TAGS} == *'aot_llvm'* ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --enable-llvm=yes --with-runtime_preset=aot "; -elif [[ ${CI_TAGS} == *'fullaot'* ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --with-runtime_preset=fullaot"; -elif [[ ${CI_TAGS} == *'hybridaot'* ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --with-runtime_preset=hybridaot"; -elif [[ ${CI_TAGS} == *'winaot'* ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --with-runtime_preset=winaot"; -elif [[ ${CI_TAGS} == *'aot'* ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --with-runtime_preset=aot"; -elif [[ ${CI_TAGS} == *'bitcode'* ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --with-runtime_preset=bitcode"; +if [[ ${CI_TAGS} == *'fullaot_llvm'* ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --enable-llvm=yes --with-runtime-preset=fullaot_llvm "; +elif [[ ${CI_TAGS} == *'hybridaot_llvm'* ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --enable-llvm=yes --with-runtime-preset=hybridaot_llvm"; +elif [[ ${CI_TAGS} == *'aot_llvm'* ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --enable-llvm=yes --with-runtime-preset=aot_llvm "; +elif [[ ${CI_TAGS} == *'fullaot'* ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --with-runtime-preset=fullaot"; +elif [[ ${CI_TAGS} == *'hybridaot'* ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --with-runtime-preset=hybridaot"; +elif [[ ${CI_TAGS} == *'winaot'* ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --with-runtime-preset=winaot"; +elif [[ ${CI_TAGS} == *'aot'* ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --with-runtime-preset=aot"; +elif [[ ${CI_TAGS} == *'bitcode'* ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --with-runtime-preset=bitcode"; elif [[ ${CI_TAGS} == *'acceptance-tests'* ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --prefix=${MONO_REPO_ROOT}/tmp/mono-acceptance-tests --with-sgen-default-concurrent=yes"; elif [[ ${CI_TAGS} == *'all-profiles'* ]]; then # only enable build of the additional profiles on one config to save time - EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --with-runtime_preset=all" + EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --with-runtime-preset=all" # when building profiles like monotouch/monodroid which don't build System.Drawing.dll in the Mono repo we need # to build the facades against _something_ to satisfy the typeforwards. In CI we can cheat a little and pass # them System.Drawing.dll from the 'build' profile since we don't test those profiles here (we just ensure they compile). |