Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
Esme Povirk committed Aug 5, 2020
2 parents 46e7ab3 + 9f129a6 commit cfb51b6
Show file tree
Hide file tree
Showing 161 changed files with 4,108 additions and 1,221 deletions.
90 changes: 70 additions & 20 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ case "$host" in
CFLAGS="$CFLAGS -D_REENTRANT -D_GNU_SOURCE -s WASM=1"
CPPFLAGS="$CPPFLAGS -D_REENTRANT -DUSE_MMAP -s WASM=1"
libgc_threads=pthreads
platform_wasm=yes
host_wasm=yes
# FIXME:
RID="osx-x64"
COREARCH="wasm32"
Expand Down Expand Up @@ -410,6 +410,13 @@ case "$host" in
host_sunos=yes
;;
*-*-darwin*)
# Temporary workaround for Apple Silicon
# config.guess returns arm-apple-darwin20.0.0
if test $ac_cv_host = arm-apple-darwin20.0.0 -o $ac_cv_target = arm-apple-darwin20.0.0; then
echo "You are running on Apple Silicon, but using an old config.guess, invoke configure like this:"
echo "Run configure using ./configure --host=aarch64-apple-darwin20.0.0 --target=aarch64-apple-darwin20.0.0"
exit 1
fi
parallel_mark="Disabled_Currently_Hangs_On_MacOSX"
host_darwin=yes
target_mach=yes
Expand Down Expand Up @@ -451,6 +458,10 @@ case "$host" in
platform_ios=yes
has_dtrace=no
;;
aarch64*-darwin20*)
# OSX/arm64
support_boehm=no
;;
aarch64*-darwin*)
platform_ios=yes
;;
Expand Down Expand Up @@ -586,7 +597,7 @@ AM_CONDITIONAL(HOST_SIGPOSIX, test x$use_sigposix = xyes)
AM_CONDITIONAL(HOST_ANDROID, test x$platform_android = xyes)
AM_CONDITIONAL(HOST_TIZEN, test x$platform_tizen = xyes)
AM_CONDITIONAL(HOST_IOS, test x$platform_ios = xyes)
AM_CONDITIONAL(HOST_WASM, test x$platform_wasm = xyes)
AM_CONDITIONAL(HOST_WASM, test x$host_wasm = xyes)
AM_CONDITIONAL(HOST_AIX, test x$host_aix = xyes)

if test -z "$HOST_DARWIN_TRUE"; then :
Expand Down Expand Up @@ -952,16 +963,6 @@ if test x$with_core = xonly; then
fi
AM_CONDITIONAL(ENABLE_NETCORE, test x$with_core = xonly)

if test x$with_core = xonly; then
if test -f $srcdir/mono/eventpipe/ep.h; then
enable_perftracing=yes
fi
if test x$enable_perftracing = xyes; then
AC_DEFINE(ENABLE_PERFTRACING,1,[Enables support for eventpipe library])
fi
fi
AM_CONDITIONAL(ENABLE_PERFTRACING, test x$enable_perftracing = xyes)

#
# A sanity check to catch cases where the package was unpacked
# with an ancient tar program (Solaris)
Expand Down Expand Up @@ -1220,6 +1221,7 @@ if test "x$crash_reporting" != "xyes"; then
CFLAGS="$CFLAGS -DDISABLE_CRASH_REPORTING=1"
CXXFLAGS="$CXXFLAGS -DDISABLE_CRASH_REPORTING=1"
fi
AM_CONDITIONAL(DISABLE_CRASH_REPORTING, test x$crash_reporting != xyes)

AC_ARG_ENABLE(monodroid, [ --enable-monodroid Enable runtime support for Monodroid (Xamarin.Android)], enable_monodroid=$enableval, enable_monodroid=no)
AM_CONDITIONAL(ENABLE_MONODROID, test x$enable_monodroid = xyes)
Expand Down Expand Up @@ -1314,6 +1316,12 @@ AC_ARG_WITH(spectre-mitigation, [ --with-spectre-mitigation=yes,no
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])

AC_ARG_WITH(static_icu, [ --with-static-icu=yes|no Integrate ICU statically into the runtime (defaults to no)],[
if test x$with_static_icu = xyes ; then
AC_DEFINE(STATIC_ICU,1,[Integrate ICU statically into the runtime.])
fi
], [with_static_icu=no])

dnl
dnl Spectre compiler mitigation flag checks
dnl
Expand Down Expand Up @@ -1411,6 +1419,7 @@ if test x$with_runtime_preset = xnetcore; then
mono_feature_disable_gac='yes'
mono_feature_disable_perfcounters='yes'
mono_feature_disable_attach='yes'
mono_feature_disable_cfgdir_config='yes'
if test "x$enable_monodroid" = "x" -a "x$enable_monotouch" = "x"; then
mono_feature_disable_dllmap='yes' # FIXME: the mobile products use this
fi
Expand Down Expand Up @@ -1701,6 +1710,7 @@ AM_CONDITIONAL(INSTALL_MONOTOUCH, [test "x$with_monotouch" != "xno"])
AM_CONDITIONAL(INSTALL_MONOTOUCH_WATCH, [test "x$with_monotouch_watch" != "xno"])
AM_CONDITIONAL(INSTALL_MONOTOUCH_TV, [test "x$with_monotouch_tv" != "xno"])
AM_CONDITIONAL(BITCODE, test "x$with_bitcode" = "xyes")
AM_CONDITIONAL(STATIC_ICU, test "x$with_static_icu" = "xyes")
AM_CONDITIONAL(INSTALL_XAMMAC, [test "x$with_xammac" != "xno"])
AM_CONDITIONAL(INSTALL_TESTING_AOT_FULL_INTERP, [test "x$with_testing_aot_full_interp" != "xno"])
AM_CONDITIONAL(INSTALL_TESTING_AOT_HYBRID, [test "x$with_testing_aot_hybrid" != "xno"])
Expand Down Expand Up @@ -1787,9 +1797,7 @@ fi
AM_CONDITIONAL(ENABLE_STATIC_GCC_LIBS, test "x$enable_static_gcc_libs" = "xyes")

AC_ARG_ENABLE(minimal, [ --enable-minimal=LIST drop support for LIST subsystems.
LIST is a comma-separated list from: aot, profiler, decimal, pinvoke, debug, appdomains, verifier, dllmap,
reflection_emit, reflection_emit_save, large_code, logging, com, ssa, generics, attach, jit, interpreter, simd, soft_debug, perfcounters, normalization, desktop_loader, shared_perfcounters, remoting,
security, lldb, mdb, assert_messages, config, cfgdir_config, cleanup, sgen_marksweep_conc, sgen_split_nursery, sgen_gc_bridge, sgen_debug_helpers, sockets, gac, threads, processes.],
LIST is a comma-separated list from: aot, profiler, decimal, pinvoke, debug, appdomains, verifier, dllmap, reflection_emit, reflection_emit_save, large_code, logging, com, ssa, generics, attach, jit, interpreter, simd, soft_debug, perfcounters, normalization, desktop_loader, shared_perfcounters, remoting, security, lldb, mdb, assert_messages, config, cfgdir_config, cleanup, sgen_marksweep_conc, sgen_split_nursery, sgen_gc_bridge, sgen_toggleref, sgen_debug_helpers, sgen_binary_protocol, sockets, gac, threads, processes, eventpipe.],
[
for feature in `echo "$enable_minimal" | sed -e "s/,/ /g"`; do
eval "mono_feature_disable_$feature='yes'"
Expand Down Expand Up @@ -1985,7 +1993,6 @@ if test "x$mono_feature_disable_sgen_marksweep_conc" = "xyes"; then
AC_MSG_NOTICE([Disabled concurrent gc support in SGEN.])
fi


if test "x$mono_feature_disable_sgen_split_nursery" = "xyes"; then
AC_DEFINE(DISABLE_SGEN_SPLIT_NURSERY, 1, [Disable minor=split support in SGEN.])
AC_MSG_NOTICE([Disabled minor=split support in SGEN.])
Expand All @@ -1996,11 +2003,21 @@ if test "x$mono_feature_disable_sgen_gc_bridge" = "xyes"; then
AC_MSG_NOTICE([Disabled gc bridge support in SGEN.])
fi

if test "x$mono_feature_disable_sgen_toggleref" = "xyes"; then
AC_DEFINE(DISABLE_SGEN_TOGGLEREF, 1, [Disable toggleref support in SGEN.])
AC_MSG_NOTICE([Disabled toggleref support in SGEN.])
fi

if test "x$mono_feature_disable_sgen_debug_helpers" = "xyes"; then
AC_DEFINE(DISABLE_SGEN_DEBUG_HELPERS, 1, [Disable debug helpers in SGEN.])
AC_MSG_NOTICE([Disabled debug helpers in SGEN.])
fi

if test "x$mono_feature_disable_sgen_binary_protocol" = "xyes"; then
AC_DEFINE(DISABLE_SGEN_BINARY_PROTOCOL, 1, [Disable binary protocol logging in SGEN.])
AC_MSG_NOTICE([Disabled binary protocol logging in SGEN.])
fi

if test "x$mono_feature_disable_sockets" = "xyes"; then
AC_DEFINE(DISABLE_SOCKETS, 1, [Disable sockets])
AC_MSG_NOTICE([Disabled sockets])
Expand All @@ -2026,6 +2043,22 @@ if test "x$mono_feature_disable_processes" = "xyes"; then
AC_MSG_NOTICE([Disabled process support])
fi

if test "x$mono_feature_disable_eventpipe" = "xyes"; then
AC_DEFINE(DISABLE_EVENTPIPE, 1, [Disable EventPipe support])
AC_MSG_NOTICE([Disabled EventPipe support])
enable_perftracing=no
fi

if test x$enable_perftracing = x -a x$with_core = xonly; then
if test -f $srcdir/mono/eventpipe/ep.h; then
enable_perftracing=yes
fi
fi
if test x$enable_perftracing = xyes; then
AC_DEFINE(ENABLE_PERFTRACING,1,[Enables support for eventpipe library])
fi
AM_CONDITIONAL(ENABLE_PERFTRACING, test x$enable_perftracing = xyes)

AC_ARG_ENABLE(executables, [ --disable-executables disable the build of the runtime executables], enable_executables=$enableval, enable_executables=yes)
AM_CONDITIONAL(DISABLE_EXECUTABLES, test x$enable_executables = xno)

Expand Down Expand Up @@ -2796,7 +2829,7 @@ if test x$host_win32 = xno; then
AC_CHECK_HEADERS(pthread_np.h)
AC_CHECK_FUNCS(pthread_mutex_timedlock)
AC_CHECK_FUNCS(pthread_getattr_np pthread_attr_get_np pthread_getname_np pthread_setname_np pthread_cond_timedwait_relative_np)
AC_CHECK_FUNCS(pthread_kill)
AC_CHECK_FUNCS(pthread_kill pthread_jit_write_protect_np)
AC_MSG_CHECKING(for PTHREAD_MUTEX_RECURSIVE)
AC_TRY_COMPILE([ #include <pthread.h>], [
pthread_mutexattr_t attr;
Expand Down Expand Up @@ -4654,7 +4687,7 @@ case "$host" in
ACCESS_UNALIGNED="yes"
BTLS_SUPPORTED=yes
BTLS_PLATFORM=s390x
CFLAGS="$CFLAGS -mbackchain -D__USE_STRING_INLINES"
CFLAGS="$CFLAGS -mbackchain"
;;
riscv32-*)
TARGET=RISCV32
Expand Down Expand Up @@ -4753,6 +4786,12 @@ if test "x$host" != "x$target"; then
sizeof_register=8
AC_DEFINE(TARGET_WATCHOS, 1, [...])
;;
aarch64*darwin*)
TARGET=ARM64
# Both ios and osx/arm64 have the same aarc64-darwin triple,
# assume ios for now when cross compiling
TARGET_SYS=IOS
;;
aarch64-*)
TARGET=ARM64
;;
Expand Down Expand Up @@ -4965,7 +5004,7 @@ if test "x$target_mach" = "xyes"; then
CPPFLAGS_FOR_LIBGC="$CPPFLAGS_FOR_LIBGC -DTARGET_WATCHOS"
CFLAGS_FOR_LIBGC="$CFLAGS_FOR_LIBGC -DTARGET_WATCHOS"
BTLS_SUPPORTED=no
elif test "x$TARGET" = "xARM" -o "x$TARGET" = "xARM64" -o "x$TARGET" = "xARM6432"; then
elif test "x$TARGET_SYS" = "xIOS" -o "x$TARGET" = "xARM" -o "x$TARGET" = "xARM6432"; then
AC_DEFINE(TARGET_IOS,1,[The JIT/AOT targets iOS])
CPPFLAGS_FOR_LIBGC="$CPPFLAGS_FOR_LIBGC -DTARGET_IOS"
CFLAGS_FOR_LIBGC="$CFLAGS_FOR_LIBGC -DTARGET_IOS"
Expand All @@ -4981,6 +5020,9 @@ if test "x$target_mach" = "xyes"; then
CPPFLAGS_FOR_LIBGC="$CPPFLAGS_FOR_LIBGC -DTARGET_OSX"
CFLAGS_FOR_LIBGC="$CFLAGS_FOR_LIBGC -DTARGET_OSX"
target_osx=yes
if test "x$TARGET" = "xARM64"; then
BTLS_SUPPORTED=no
fi
], [
AC_DEFINE(TARGET_IOS,1,[The JIT/AOT targets iOS])
CPPFLAGS_FOR_LIBGC="$CPPFLAGS_FOR_LIBGC -DTARGET_IOS"
Expand Down Expand Up @@ -6769,8 +6811,10 @@ AC_SUBST(MONO_NATIVE_PLATFORM_TYPE_UNIFIED)
#
if test "x$enable_llvm_runtime" = "xyes"; then
AC_SUBST(MONO_CXXLD, [$CXX])
AC_SUBST(MONO_LIBTOOL_TAG, '--tag=CXX')
else
AC_SUBST(MONO_CXXLD, [$CC])
AC_SUBST(MONO_LIBTOOL_TAG, '')
fi

### Set -Werror options
Expand Down Expand Up @@ -6841,7 +6885,10 @@ if test x$with_core = xonly; then
fi
if test x$have_shim_globalization = xyes || test x$cross_compiling = xyes; then
ICU_SHIM_PATH=../../../libraries/Native/Unix/System.Globalization.Native
if test x$target_osx = xyes; then
if test x$target_wasm = xyes && test x$with_static_icu = xyes; then
ICU_CFLAGS="-DTARGET_UNIX -DU_DISABLE_RENAMING -DHAVE_UDAT_STANDALONE_SHORTER_WEEKDAYS -DHAVE_SET_MAX_VARIABLE"
have_sys_icu=yes
elif test x$target_osx = xyes; then
ORIG_CPPFLAGS=$CPPFLAGS
# adding icu path to pkg_config_path
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig:/usr/local/opt/icu4c/lib/pkgconfig
Expand Down Expand Up @@ -6869,6 +6916,9 @@ if test x$with_core = xonly; then
elif test x$host_sunos = xyes; then
ICU_CFLAGS="-DPALEXPORT="" -DTARGET_UNIX -Wno-reserved-id-macro -Wno-documentation -Wno-documentation-unknown-command -Wno-switch-enum -Wno-covered-switch-default -Wno-extra-semi-stmt -Wno-unknown-warning-option"
have_sys_icu=yes
elif test x$host_wasm = xyes; then
ICU_CFLAGS="-DPALEXPORT="" -DTARGET_UNIX -Wno-reserved-id-macro -Wno-documentation -Wno-documentation-unknown-command -Wno-switch-enum -Wno-covered-switch-default -Wno-covered-switch-default -Wno-extra-semi-stmt -Wno-unknown-warning-option"
have_sys_icu=yes
else
GLOBALIZATION_SHIM_DEFINES="-DNO_GLOBALIZATION_SHIM"
fi
Expand Down
2 changes: 1 addition & 1 deletion docs/README
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Layout
as well as the upcoming Monodoc tools and index creation
tools).

The files can contain any ammount of extra information.
The files can contain any amount of extra information.

The documentation from the source code is then merged with
these files and the header/footer information to produce
Expand Down
2 changes: 1 addition & 1 deletion external/bockbuild
Submodule bockbuild updated 2 files
+1 −0 packages/cairo.py
+122 −0 packages/patches/cairo-bigsur.patch
2 changes: 1 addition & 1 deletion external/ikvm
Submodule ikvm updated 1 files
+5 −1 reflect/MethodSignature.cs
37 changes: 31 additions & 6 deletions mcs/class/System.Transactions/System.Transactions/Transaction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ public class Transaction : IDisposable, ISerializable
[ThreadStatic]
static Transaction ambient;

Transaction internalTransaction;

IsolationLevel level;
TransactionInformation info;

Expand Down Expand Up @@ -83,6 +85,8 @@ internal Transaction (Transaction other)
volatiles = other.Volatiles;
durables = other.Durables;
pspe = other.Pspe;
TransactionCompletedInternal = other.TransactionCompletedInternal;
internalTransaction = other;
}

[MonoTODO]
Expand All @@ -92,7 +96,29 @@ void ISerializable.GetObjectData (SerializationInfo info,
throw new NotImplementedException ();
}

public event TransactionCompletedEventHandler TransactionCompleted;
internal event TransactionCompletedEventHandler TransactionCompletedInternal;

// Transaction B was cloned from transaction A. Add event handlers to A
// when they are added to B. This will not work when new handlers are added to A
// as A has no reference to B.
public event TransactionCompletedEventHandler TransactionCompleted
{
add
{
if (this.internalTransaction != null)
this.internalTransaction.TransactionCompleted += value;

TransactionCompletedInternal += value;
}

remove
{
if (this.internalTransaction != null)
this.internalTransaction.TransactionCompleted -= value;

TransactionCompletedInternal -= value;
}
}

public static Transaction Current {
get {
Expand Down Expand Up @@ -378,7 +404,7 @@ internal void CommitInternal ()
private void DoCommit ()
{
/* Scope becomes null in TransactionScope.Dispose */
if (Scope != null) {
if (Scope != null && (!Scope.IsComplete || !Scope.IsDisposed)) {
/* See test ExplicitTransaction8 */
Rollback (null, null);
CheckAborted ();
Expand Down Expand Up @@ -529,14 +555,14 @@ void DoSingleCommit (IPromotableSinglePhaseNotification single)

void CheckAborted ()
{
if (aborted)
if (aborted || (Scope != null && Scope.IsAborted))
throw new TransactionAbortedException ("Transaction has aborted", innerException);
}

void FireCompleted ()
{
if (TransactionCompleted != null)
TransactionCompleted (this, new TransactionEventArgs(this));
if (TransactionCompletedInternal != null)
TransactionCompletedInternal (this, new TransactionEventArgs(this));
}

static void EnsureIncompleteCurrentScope ()
Expand All @@ -548,4 +574,3 @@ static void EnsureIncompleteCurrentScope ()
}
}
}

Loading

0 comments on commit cfb51b6

Please sign in to comment.