[runtime] Make AOT'ed TestDriver.dll dependency for builds (#3303)
[mono.git] / configure.ac
index f4b2a3ac453b175796d89be0fb8f3e532ddb2731..f2ac137b67f46b2067829fdf1f1af9d31a3abd59 100644 (file)
@@ -353,6 +353,18 @@ AM_CONDITIONAL(PLATFORM_DARWIN, test x$host_darwin = xyes)
 AM_CONDITIONAL(PLATFORM_SIGPOSIX, test x$use_sigposix = xyes)
 AM_CONDITIONAL(PLATFORM_ANDROID, test x$platform_android = xyes)
 
+if test -z "$PLATFORM_DARWIN_TRUE"; then :
+PLATFORM_AOT_SUFFIX=.dylib
+fi
+
+if test -z "$PLATFORM_LINUX_TRUE"; then :
+PLATFORM_AOT_SUFFIX=.so
+fi
+
+AC_SUBST(PLATFORM_AOT_SUFFIX)
+
+## PLATFORM_AOT_SUFFIX not so simple for windows :-)
+
 AC_CHECK_TOOL(CC, gcc, gcc)
 AC_PROG_CC
 AC_CHECK_TOOL(CXX, g++, g++)
@@ -748,7 +760,6 @@ dnl
 TEST_PROFILE=default
 enable_llvm_default=no
 
-AOT_BUILD_FLAGS_PREFIX=
 INVARIANT_AOT_OPTIONS=nimt-trampolines=900,ntrampolines=8000,nrgctx-fetch-trampolines=256,ngsharedvt-trampolines=2800
 
 if test x$cross_compiling = xyes -o x$enable_mcs_build = xno; then
@@ -780,7 +791,7 @@ elif test x$with_runtime_preset = xall; then
    with_monotouch_watch_default=yes
    with_monotouch_tv_default=yes
    with_xammac_default=yes
-   with_mobile_static_default=yes
+   with_mobile_static_default=no
    with_bitcode_default=no
 elif test x$with_runtime_preset = xmobile_static; then
    DISABLE_MCS_DOCS_default=yes
@@ -796,8 +807,14 @@ elif test x$with_runtime_preset = xmobile_static; then
    with_cooperative_gc_default=no
    TEST_PROFILE=mobile_static 
 
-   AOT_BUILD_FLAGS_PREFIX='-O=gsharedvt --aot=full,'
-   AOT_RUN_FLAGS=--full-aot
+   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="-O=gsharedvt --aot=full,$INVARIANT_AOT_OPTIONS"
+   AOT_RUN_FLAGS="--full-aot"
 elif test x$with_runtime_preset = xbitcode_mobile_static; then
    DISABLE_MCS_DOCS_default=yes
    with_profile4_x_default=no
@@ -812,8 +829,14 @@ elif test x$with_runtime_preset = xbitcode_mobile_static; then
    TEST_PROFILE=mobile_static 
    enable_llvm_default=yes
 
-   AOT_BUILD_FLAGS_PREFIX=--aot=llvmonly,
-   AOT_RUN_FLAGS=--llvmonly
+   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=llvmonly,$INVARIANT_AOT_OPTIONS"
+   AOT_RUN_FLAGS="--llvmonly"
 else
    with_profile4_x_default=yes
    with_monodroid_default=no
@@ -826,10 +849,10 @@ else
    with_cooperative_gc_default=no
 fi
 
-AOT_BUILD_FLAGS=$AOT_BUILD_FLAGS_PREFIX$INVARIANT_AOT_OPTIONS
-
-AC_SUBST(AOT_BUILD_FLAGS)
-AC_SUBST(AOT_RUN_FLAGS)
+if test "x$AOT_BUILD_FLAGS" != "x"; then :
+   AC_SUBST(AOT_BUILD_FLAGS)
+   AC_SUBST(AOT_RUN_FLAGS)
+fi
 
 AC_SUBST(TEST_PROFILE)
 
@@ -4217,6 +4240,10 @@ fi
       echo "PLATFORM = darwin" >> $mcs_topdir/build/config.make
     fi
 
+    if test "x$PLATFORM_AOT_SUFFIX" != "x"; then
+      echo "PLATFORM_AOT_SUFFIX = $PLATFORM_AOT_SUFFIX" >> $mcs_topdir/build/config.make
+    fi
+
        if test x$AOT_SUPPORTED = xyes -a x$enable_system_aot = xdefault; then
           enable_system_aot=yes
        fi
@@ -4239,9 +4266,9 @@ fi
       echo "BCL_OPTIMIZE = 1" >> $srcdir/$mcsdir/build/config.make
     fi
 
-    if test "x$AOT_BUILD_FLAGS_PREFIX" != "x" ; then
-      echo "AOT_RUN_FLAGS = $AOT_RUN_FLAGS" >> $srcdir/$mcsdir/build/config.make
-      echo "AOT_BUILD_FLAGS = $AOT_BUILD_FLAGS" >> $srcdir/$mcsdir/build/config.make
+    if test "x$AOT_BUILD_FLAGS" != "x" ; then
+      echo "AOT_RUN_FLAGS=$AOT_RUN_FLAGS" >> $srcdir/$mcsdir/build/config.make
+      echo "AOT_BUILD_FLAGS=$AOT_BUILD_FLAGS" >> $srcdir/$mcsdir/build/config.make
     fi
 
   fi