[runtime] Add a 'shared_handles' --enable-minimal option, same as --disable-shared...
authorZoltan Varga <vargaz@gmail.com>
Wed, 15 Oct 2014 21:18:21 +0000 (17:18 -0400)
committerZoltan Varga <vargaz@gmail.com>
Wed, 15 Oct 2014 21:18:21 +0000 (17:18 -0400)
configure.ac
mono/io-layer/shared.c
mono/mini/wapihandles.c

index b7898abe061a1d467733c9d5fd30223a7c0c407d..66d9a98c35954be94753c5b8ded2cc0ec650f511 100644 (file)
@@ -767,7 +767,7 @@ DISABLED_FEATURES=none
 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, 
      reflection_emit, reflection_emit_save, large_code, logging, com, ssa, generics, attach, jit, simd, soft_debug, perfcounters, normalization, assembly_remapping, shared_perfcounters, remoting,
-        security, sgen_remset, sgen_marksweep_par, sgen_marksweep_fixed, sgen_marksweep_fixed_par, sgen_copying.],
+        security, sgen_remset, sgen_marksweep_par, sgen_marksweep_fixed, sgen_marksweep_fixed_par, sgen_copying, shared_handles.],
 [
        for feature in `echo "$enable_minimal" | sed -e "s/,/ /g"`; do
                eval "mono_feature_disable_$feature='yes'"
@@ -941,6 +941,11 @@ if test "x$mono_feature_disable_sgen_copying" = "xyes"; then
        AC_MSG_NOTICE([Disabled major=copying support in SGEN.])
 fi
 
+if test "x$mono_feature_disable_shared_handles" = "xyes"; then
+       AC_DEFINE(DISABLE_SHARED_HANDLES, 1, [Disable inter-process shared handles])
+       AC_SUBST(DISABLE_SHARED_HANDLES)
+fi
+
 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)
 
@@ -2283,6 +2288,7 @@ if test "x$ac_cv_have_dev_random" = "xno" \
 fi
  
 AC_MSG_CHECKING([if inter-process shared handles are requested])
+# Same as --enable-minimal=shared_handles
 AC_ARG_ENABLE(shared-handles, [  --disable-shared-handles disable inter-process shared handles], try_shared_handles=$enableval, try_shared_handles=yes)
 AC_MSG_RESULT($try_shared_handles)
 if test "x$try_shared_handles" != "xyes"; then
index 1800f9b74a72d97c853ea0579d5c50e233cd61d1..bfbcd7a1bdfeb26551e0fae110466aca20845bce 100644 (file)
@@ -157,7 +157,8 @@ _wapi_shm_enabled (void)
        return FALSE;
 }
 
-#else
+#else /* DISABLE_SHARED_HANDLES */
+
 /*
  * Use POSIX shared memory if possible, it is simpler, and it has the advantage that 
  * writes to the shared area does not need to be written to disk, avoiding spinning up 
index 5f89bcd9eb724c79acf97942549aabe70b2941cd..7bda38843ef4d8df290858f41da479d940727c6c 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "mini.h"
 
-#if defined(HOST_WIN32) || !defined(HAVE_SYS_IPC_H) || !defined(HAVE_SYS_SEM_H) || (defined(__native_client__) && defined(__GLIBC__))
+#if defined(HOST_WIN32) || !defined(HAVE_SYS_IPC_H) || !defined(HAVE_SYS_SEM_H) || (defined(__native_client__) && defined(__GLIBC__)) || defined(DISABLE_SHARED_HANDLES)
 
 int mini_wapi_hps (int argc, char **argv)
 {