INVARIANT_AOT_OPTIONS=nimt-trampolines=2000,ntrampolines=8000,nrgctx-fetch-trampolines=256,ngsharedvt-trampolines=4000
+AOT_BUILD_ATTRS=$INVARIANT_AOT_OPTIONS
+
if test x$cross_compiling = xyes -o x$enable_mcs_build = xno; then
DISABLE_MCS_DOCS_default=yes
elif test x$with_runtime_preset = xnet_4_x; then
mono_feature_disable_appdomains='yes'
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
DISABLE_MCS_DOCS_default=yes
with_testing_aot_full_default=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 = xhybridaot; then
DISABLE_MCS_DOCS_default=yes
with_testing_aot_hybrid_default=yes
AOT_BUILD_FLAGS="--runtime=mobile --aot=full,$INVARIANT_AOT_OPTIONS"
AOT_RUN_FLAGS="--runtime=mobile --full-aot"
+ AOT_MODE="llvmonly"
elif test x$with_runtime_preset = xorbis; then
DISABLE_MCS_DOCS_default=yes
with_orbis_default=yes
AOT_BUILD_FLAGS="--runtime=mobile --aot=full,$INVARIANT_AOT_OPTIONS"
AOT_RUN_FLAGS="--runtime=mobile --full-aot"
+ AOT_MODE="full"
elif test x$with_runtime_preset = xunreal; then
DISABLE_MCS_DOCS_default=yes
with_unreal_default=yes
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
+ echo "AOT_BUILD_ATTRS=$AOT_BUILD_ATTRS" >> $srcdir/$mcsdir/build/config.make
+ fi
+
+ if test "x$AOT_MODE" != "x" ; then
+ echo "AOT_MODE=$AOT_MODE" >> $srcdir/$mcsdir/build/config.make
fi
if test "x$enable_btls" = "xyes"; then
$(MKBUNDLE_EXE):
make -C $(topdir)/tools/mkbundle
-$(TEST_HARNESS_BIN): $(MKBUNDLE_EXE)
- $(TEST_RUNTIME) $(MKBUNDLE_EXE) -L $(topdir)/class/lib/$(PROFILE) -v --deps $(TEST_HARNESS) $(BUNDLED_ASSEMBLIES) -o $(TEST_HARNESS_BIN) --aot-mode $(STATIC_AOT_BUNDLE) --aot-runtime $(RUNTIME)
+$(TEST_HARNESS_BIN): $(MKBUNDLE_EXE) $(test_assemblies) $(BUNDLED_ASSEMBLIES)
+ PKG_CONFIG_PATH="$(topdir)/../data" $(TEST_RUNTIME) $(MKBUNDLE_EXE) -L $(topdir)/class/lib/$(PROFILE) -v --deps $(TEST_HARNESS) $(test_assemblies) $(BUNDLED_ASSEMBLIES) -o $(TEST_HARNESS_BIN) --aot-mode $(AOT_MODE) --aot-runtime $(RUNTIME) --aot-args $(AOT_BUILD_ATTRS) --in-tree $(topdir)/.. --keeptemp
else
TEST_HARNESS_EXEC = $(TEST_RUNTIME) $(RUNTIME_FLAGS) $(AOT_RUN_FLAGS) $(TEST_HARNESS)
static List<string> aot_names = new List<string> ();
static Dictionary<string,string> libraries = new Dictionary<string,string> ();
static bool autodeps = false;
+ static string in_tree = null;
static bool keeptemp = false;
static bool compile_only = false;
static bool static_link = false;
case "--bundled-header":
bundled_header = true;
break;
+ case "--in-tree":
+ if (i+1 == top) {
+ Console.WriteLine ("Usage: --in-tree <path/to/headers> ");
+ return 1;
+ }
+ in_tree = args [++i];
+ break;
case "--aot-runtime":
+ if (i+1 == top) {
+ Console.WriteLine ("Usage: --aot-runtime <path/to/runtime> ");
+ return 1;
+ }
aot_runtime = args [++i];
+ aot_compile = true;
+ static_link = true;
break;
case "--aot-dedup":
if (i+1 == top) {
sources.Add (dedup_file);
aot_dedup_assembly = sources.Count () - 1;
aot_compile = true;
+ static_link = true;
break;
case "--aot-mode":
if (i+1 == top) {
}
aot_compile = true;
+ static_link = true;
break;
case "--aot-args":
if (i+1 == top) {
}
aot_args = String.Format("static,{0}", args [++i]);
aot_compile = true;
+ static_link = true;
break;
default:
sources.Add (args [i]);
break;
}
+
}
// Modern bundling starts here
if (!custom_mode){
} else {
tc.WriteLine ("#include <mono/metadata/mono-config.h>");
tc.WriteLine ("#include <mono/metadata/assembly.h>\n");
- tc.WriteLine ("#include <mono/jit/jit.h>\n");
+
+ if (in_tree != null)
+ tc.WriteLine ("#include <mono/mini/jit.h>\n");
+ else
+ tc.WriteLine ("#include <mono/jit/jit.h>\n");
}
if (compress) {
platform_libs = "";
}
- cmd = String.Format("{4} -o '{2}' -Wall `pkg-config --cflags mono-2` {0} {3} " +
+ string in_tree_include = "";
+
+ if (in_tree != null) {
+ smonolib = String.Format ("{0}/mono/mini/.libs/libmonosgen-2.0.a", in_tree);
+ in_tree_include = String.Format (" -I{0} ", in_tree);
+ }
+
+ cmd = String.Format("{4} -o '{2}' -Wall `pkg-config --cflags mono-2` {7} {0} {3} " +
"`pkg-config --libs-only-L mono-2` {5} {6} " + platform_libs +
"`pkg-config --libs-only-l mono-2 | sed -e \"s/\\-lmono-2.0 //\"` {1} -g ",
- temp_c, temp_o, output, zlib, cc, smonolib, String.Join (" ", aot_paths));
+ temp_c, temp_o, output, zlib, cc, smonolib, String.Join (" ", aot_paths), in_tree_include);
}
else
{