Imported Upstream version 4.6.0.125

Former-commit-id: a2155e9bd80020e49e72e86c44da02a8ac0e57a4
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2016-08-03 10:59:49 +00:00
parent a569aebcfd
commit e79aa3c0ed
17047 changed files with 3137615 additions and 392334 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -28,7 +28,8 @@ COMMON_SRCS = \
Locale.cs \
MonoTODOAttribute.cs \
basic-profile-check.cs \
SR.cs
SR.cs \
AssemblyRef.cs
DISTFILES = \
README.makefiles \

View File

@@ -0,0 +1,25 @@
static class AssemblyRef
{
// FIXME
internal const string SystemConfiguration = "System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
internal const string System = "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";
public const string EcmaPublicKey = "b77a5c561934e089";
#if NET_2_1
public const string FrameworkPublicKeyFull = "0024000004800000940000000602000000240000525341310004000001000100B5FC90E7027F67871E773A8FDE8938C81DD402BA65B9201D60593E96C492651E889CC13F1415EBB53FAC1131AE0BD333C5EE6021672D9718EA31A8AEBD0DA0072F25D87DBA6FC90FFD598ED4DA35E44C398C454307E8E33B8426143DAEC9F596836F97C8F74750E5975C64E2189F45DEF46B2A2B1247ADC3652BF5C308055DA9";
public const string FrameworkPublicKeyFull2 = "00240000048000009400000006020000002400005253413100040000010001008D56C76F9E8649383049F383C44BE0EC204181822A6C31CF5EB7EF486944D032188EA1D3920763712CCB12D75FB77E9811149E6148E5D32FBAAB37611C1878DDC19E20EF135D0CB2CFF2BFEC3D115810C3D9069638FE4BE215DBF795861920E5AB6F7DB2E2CEEF136AC23D5DD2BF031700AEC232F6C6B1C785B4305C123B37AB";
#else
public const string FrameworkPublicKeyFull = "00000000000000000400000000000000";
public const string FrameworkPublicKeyFull2 = "00000000000000000400000000000000";
#endif
public const string MicrosoftPublicKey = "b03f5f7f11d50a3a";
public const string MicrosoftJScript = Consts.AssemblyMicrosoft_JScript;
public const string MicrosoftVSDesigner = Consts.AssemblyMicrosoft_VSDesigner;
public const string SystemData = Consts.AssemblySystem_Data;
public const string SystemDesign = Consts.AssemblySystem_Design;
public const string SystemDrawing = Consts.AssemblySystem_Drawing;
public const string SystemWeb = Consts.AssemblySystem_Web;
public const string SystemWebExtensions = "System.Web.Extensions, Version=" + Consts.FxVersion + ", Culture=neutral, PublicKeyToken=31bf3856ad364e35";
public const string SystemWindowsForms = Consts.AssemblySystem_Windows_Forms;
}

View File

@@ -34,7 +34,7 @@ static class Consts
// Use these assembly version constants to make code more maintainable.
//
public const string MonoVersion = "4.4.2.0";
public const string MonoVersion = "4.6.0.0";
public const string MonoCompany = "Mono development team";
public const string MonoProduct = "Mono Common Language Infrastructure";
public const string MonoCopyright = "(c) Various Mono authors";

View File

@@ -1,31 +1,5 @@
using System.Globalization;
static class AssemblyRef
{
// FIXME
internal const string SystemConfiguration = "System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
internal const string System = "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";
public const string EcmaPublicKey = "b77a5c561934e089";
#if NET_2_1
public const string FrameworkPublicKeyFull = "0024000004800000940000000602000000240000525341310004000001000100B5FC90E7027F67871E773A8FDE8938C81DD402BA65B9201D60593E96C492651E889CC13F1415EBB53FAC1131AE0BD333C5EE6021672D9718EA31A8AEBD0DA0072F25D87DBA6FC90FFD598ED4DA35E44C398C454307E8E33B8426143DAEC9F596836F97C8F74750E5975C64E2189F45DEF46B2A2B1247ADC3652BF5C308055DA9";
public const string FrameworkPublicKeyFull2 = "00240000048000009400000006020000002400005253413100040000010001008D56C76F9E8649383049F383C44BE0EC204181822A6C31CF5EB7EF486944D032188EA1D3920763712CCB12D75FB77E9811149E6148E5D32FBAAB37611C1878DDC19E20EF135D0CB2CFF2BFEC3D115810C3D9069638FE4BE215DBF795861920E5AB6F7DB2E2CEEF136AC23D5DD2BF031700AEC232F6C6B1C785B4305C123B37AB";
#else
public const string FrameworkPublicKeyFull = "00000000000000000400000000000000";
public const string FrameworkPublicKeyFull2 = "00000000000000000400000000000000";
#endif
public const string MicrosoftPublicKey = "b03f5f7f11d50a3a";
public const string MicrosoftJScript = Consts.AssemblyMicrosoft_JScript;
public const string MicrosoftVSDesigner = Consts.AssemblyMicrosoft_VSDesigner;
public const string SystemData = Consts.AssemblySystem_Data;
public const string SystemDesign = Consts.AssemblySystem_Design;
public const string SystemDrawing = Consts.AssemblySystem_Drawing;
public const string SystemWeb = Consts.AssemblySystem_Web;
public const string SystemWebExtensions = "System.Web.Extensions, Version=" + Consts.FxVersion + ", Culture=neutral, PublicKeyToken=31bf3856ad364e35";
public const string SystemWindowsForms = Consts.AssemblySystem_Windows_Forms;
}
static partial class SR
{
internal static string GetString(string name, params object[] args)

View File

@@ -10,7 +10,7 @@
CODEPAGE = 65001
RUNTIME_FLAGS =
TEST_HARNESS = $(topdir)/class/lib/$(PROFILE)/nunit-console.exe
TEST_HARNESS = $(topdir)/class/lib/$(PROFILE)/$(PARENT_PROFILE)nunit-console.exe
MCS_FLAGS =
MBAS_FLAGS = $(PLATFORM_DEBUG_FLAGS)
LIBRARY_FLAGS = /noconfig
@@ -23,7 +23,7 @@ mono_libdir = $(exec_prefix)/lib
sysconfdir = $(prefix)/etc
#RUNTIME = mono
RUNTIME = false
TEST_RUNTIME = MONO_PATH="$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$(TEST_MONO_PATH)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) --debug
TEST_RUNTIME = MONO_PATH="./$(PLATFORM_PATH_SEPARATOR)$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$(TEST_MONO_PATH)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) --debug
# In case you want to add MCS_FLAGS, this lets you not have to
# keep track of the default value

View File

@@ -31,6 +31,9 @@ ifdef base_prog_config
PROGRAM_config := $(build_libdir)$(PROGRAM).config
endif
sn = $(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)/sn.exe
SN = MONO_PATH="$(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(RUNTIME_FLAGS) $(sn) -q
the_lib = $(the_libdir)$(base_prog)
build_lib = $(build_libdir)$(base_prog)
@@ -110,7 +113,10 @@ endif
$(the_lib): $(the_libdir)/.stamp
$(build_lib): $(BUILT_SOURCES) $(EXTRA_SOURCES) $(response) $(build_libdir:=/.stamp)
$(PROGRAM_COMPILE) -target:exe -out:$@ $(BUILT_SOURCES) $(EXTRA_SOURCES) @$(response)
$(PROGRAM_COMPILE) $(MCS_REFERENCES) -target:exe -out:$@ $(BUILT_SOURCES) $(EXTRA_SOURCES) @$(response)
ifdef PROGRAM_SNK
$(Q) $(SN) -R $@ $(PROGRAM_SNK)
endif
ifdef PROGRAM_USE_INTERMEDIATE_FILE
$(the_lib): $(build_lib)
@@ -143,8 +149,20 @@ endif
-include $(makefrag)
MCS_REFERENCES = $(patsubst %,-r:$(topdir)/class/lib/$(PROFILE)/%.dll,$(LIB_REFS))
MCS_REFERENCES += $(patsubst %,-r:$(topdir)/class/lib/$(PROFILE)/%.exe,$(EXE_REFS))
all-local: $(makefrag) $(extra_targets)
ifdef BUILT_SOURCES
library_CLEAN_FILES += $(BUILT_SOURCES)
ifeq (cat, $(PLATFORM_CHANGE_SEPARATOR_CMD))
BUILT_SOURCES_cmdline = $(BUILT_SOURCES)
else
BUILT_SOURCES_cmdline = `echo $(BUILT_SOURCES) | $(PLATFORM_CHANGE_SEPARATOR_CMD)`
endif
endif
csproj-local:
config_file=`basename $(PROGRAM) .exe`-$(PROFILE).input; \
echo $(thisdir):$$config_file >> $(topdir)/../msvc/scripts/order; \

View File

@@ -43,7 +43,7 @@ sort -u $outfile.inc > $outfile.inc_s
rm -f $outfile.inc
if test -n "$excfile"; then
if test -n "$excfile" -a -f "$excfile"; then
process_includes $excfile $outfile.exc
fi
@@ -54,10 +54,22 @@ if test -n "$extexcfile"; then
fi
if test -f $outfile.exc; then
# So what we're doing below with uniq -u is that we take
# lines that have not been duplicated. This computes the
# symmetric difference between the files. This is not
# what we want. If a file is in the excludes but not in
# the sources, we want that file not to show up. By duplicating the
# excludes, we ensure that we won't end up in this failure state.
sort -u $outfile.exc > $outfile.exc_s
rm -f $outfile.exc
sort -m $outfile.inc_s $outfile.exc_s | uniq -u > $outfile
rm -f $outfile.inc_s $outfile.exc_s
# Duplicate excludes
cat $outfile.exc_s >> $outfile.exc_s_dup
cat $outfile.exc_s >> $outfile.exc_s_dup
rm -f $outfile.exc $outfile.exc_s
cat $outfile.inc_s $outfile.exc_s_dup | sort | uniq -u > $outfile
rm -f $outfile.inc_s $outfile.exc_s_dup
else
mv $outfile.inc_s $outfile
fi

View File

@@ -18,7 +18,13 @@
# Have to rename to handle differences between assembly/directory names
DEP_LIBS=$(patsubst System.Xml,System.XML,$(LIB_REFS))
LIB_MCS_FLAGS += $(patsubst %,-r:%,$(LIB_REFS))
_FILTER_OUT = $(foreach x,$(2),$(if $(findstring $(1),$(x)),,$(x)))
LIB_REFS_FULL = $(call _FILTER_OUT,=, $(LIB_REFS))
LIB_REFS_ALIAS = $(filter-out $(LIB_REFS_FULL),$(LIB_REFS))
LIB_MCS_FLAGS += $(patsubst %,-r:$(topdir)/class/lib/$(PROFILE)/%.dll,$(LIB_REFS_FULL))
LIB_MCS_FLAGS += $(patsubst %,-r:%.dll, $(subst =,=$(topdir)/class/lib/$(PROFILE)/,$(LIB_REFS_ALIAS)))
sourcefile = $(LIBRARY).sources
@@ -29,24 +35,11 @@ PROFILE_excludes = $(wildcard $(PROFILE)_$(LIBRARY).exclude.sources)
sourcefile = $(depsdir)/$(PROFILE)_$(LIBRARY).sources
library_CLEAN_FILES += $(sourcefile)
ifdef EXTENSION_MODULE
EXTENSION_include = $(wildcard $(topdir)/../../mono-extensions/mcs/$(thisdir)/$(PROFILE)_$(LIBRARY).sources)
else
EXTENSION_include = $(wildcard $(PROFILE)_opt_$(LIBRARY).sources)
endif
ifdef EXTENSION_MODULE
EXTENSION_exclude = $(wildcard $(topdir)/../../mono-extensions/mcs/$(thisdir)/$(PROFILE)_$(LIBRARY).exclude.sources)
else
EXTENSION_exclude = $(wildcard $(PROFILE)_opt_$(LIBRARY).exclude.sources)
endif
# Note, gensources.sh can create a $(sourcefile).makefrag if it sees any '#include's
# We don't include it in the dependencies since it isn't always created
$(sourcefile): $(PROFILE_sources) $(PROFILE_excludes) $(topdir)/build/gensources.sh $(EXTENSION_include)
$(sourcefile): $(PROFILE_sources) $(PROFILE_excludes) $(topdir)/build/gensources.sh
@echo Creating the per profile list $@ ...
$(SHELL) $(topdir)/build/gensources.sh $@ '$(PROFILE_sources)' '$(PROFILE_excludes)' '$(EXTENSION_include)' '$(EXTENSION_exclude)'
$(SHELL) $(topdir)/build/gensources.sh $@ '$(PROFILE_sources)' '$(PROFILE_excludes)'
endif
PLATFORM_excludes := $(wildcard $(LIBRARY).$(PLATFORM)-excludes)
@@ -80,7 +73,9 @@ endif
ifdef RESOURCE_STRINGS
ifdef BOOTSTRAP_PROFILE
MCS_FLAGS_RESOURCE_STRINGS += $(RESOURCE_STRINGS:%=--getresourcestrings:%)
ifneq (basic, $(BUILD_TOOLS_PROFILE))
RESOURCE_STRINGS_FILES += $(RESOURCE_STRINGS:%=--resourcestrings:%)
endif
endif
endif
@@ -139,7 +134,7 @@ endif
csproj-local: csproj-library csproj-test
intermediate_clean=$(subst /,-,$(intermediate))
csproj-library:
csproj-library:
config_file=`basename $(LIBRARY) .dll`-$(intermediate_clean)$(PROFILE).input; \
case "$(thisdir)" in *"Facades"*) config_file=Facades_$$config_file;; esac; \
echo $(thisdir):$$config_file >> $(topdir)/../msvc/scripts/order; \
@@ -251,6 +246,7 @@ dist-local: dist-default
for f in `$(topdir)/tools/removecomments.sh $(wildcard *$(LIBRARY).sources)` $(TEST_FILES) ; do \
case $$f in \
../*) : ;; \
*.g.cs) : ;; \
*) dest=`dirname "$$f"` ; \
case $$subs in *" $$dest "*) : ;; *) subs=" $$dest$$subs" ; $(MKINSTALLDIRS) $(distdir)/$$dest ;; esac ; \
cp -p "$$f" $(distdir)/$$dest || exit 1 ;; \
@@ -280,8 +276,11 @@ endif
$(the_lib): $(the_libdir)/.stamp
$(build_lib): $(response) $(sn) $(BUILT_SOURCES) $(build_libdir:=/.stamp)
$(LIBRARY_COMPILE) $(LIBRARY_FLAGS) $(LIB_MCS_FLAGS) $(MCS_FLAGS_RESOURCE_STRINGS) -target:library -out:$@ $(BUILT_SOURCES_cmdline) @$(response)
$(LIBRARY_COMPILE) $(LIBRARY_FLAGS) $(LIB_MCS_FLAGS) -target:library -out:$@ $(BUILT_SOURCES_cmdline) @$(response)
$(Q) $(SN) -R $@ $(LIBRARY_SNK)
ifdef RESOURCE_STRINGS_FILES
$(Q) $(STRING_REPLACER) $(RESOURCE_STRINGS_FILES) $@
endif
ifdef LIBRARY_USE_INTERMEDIATE_FILE
$(the_lib): $(build_lib)
@@ -295,17 +294,13 @@ library_CLEAN_FILES += $(PROFILE)_aot.log
ifdef PLATFORM_AOT_SUFFIX
Q_AOT=$(if $(V),,@echo "AOT [$(PROFILE)] $(notdir $(@))";)
$(the_lib)$(PLATFORM_AOT_SUFFIX): $(the_lib)
$(Q_AOT) MONO_PATH='$(the_libdir)' > $(PROFILE)_aot.log 2>&1 $(RUNTIME) --aot=bind-to-runtime-version --debug $(the_lib)
$(Q_AOT) MONO_PATH='$(the_libdir_base)' > $(PROFILE)_$(LIBRARY_NAME)_aot.log 2>&1 $(RUNTIME) $(AOT_BUILD_FLAGS) --debug $(the_lib)
all-local-aot: $(the_lib)$(PLATFORM_AOT_SUFFIX)
endif
ifdef ENABLE_AOT
ifneq (,$(filter $(AOT_IN_PROFILES), $(PROFILE)))
all-local: $(the_lib)$(PLATFORM_AOT_SUFFIX)
endif
endif
makefrag = $(depsdir)/$(PROFILE)_$(LIBRARY_SUBDIR)_$(LIBRARY).makefrag
library_CLEAN_FILES += $(makefrag)

View File

@@ -18,7 +18,7 @@ endif
MCS = $(with_mono_path) $(INTERNAL_GMCS)
PROFILE_MCS_FLAGS = -d:NET_4_0 -d:NET_4_5 -d:MONO -d:BOOTSTRAP_BASIC -nowarn:1699 -d:DISABLE_CAS_USE -lib:$(topdir)/class/lib/$(PROFILE)
PROFILE_MCS_FLAGS = -d:NET_4_0 -d:NET_4_5 -d:MONO -d:BOOTSTRAP_BASIC -nowarn:1699 -lib:$(topdir)/class/lib/$(PROFILE)
NO_SIGN_ASSEMBLY = yes
NO_TEST = yes
NO_INSTALL = yes

View File

@@ -12,8 +12,8 @@ MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARAT
profile-check:
@:
DEFAULT_REFERENCES = -r:mscorlib.dll
PROFILE_MCS_FLAGS = -d:NET_4_0 -d:NET_4_5 -d:MONO -d:DISABLE_CAS_USE -nowarn:1699 -nostdlib -lib:$(topdir)/class/lib/$(PROFILE) $(DEFAULT_REFERENCES)
DEFAULT_REFERENCES = -r:$(topdir)/class/lib/$(PROFILE)/mscorlib.dll
PROFILE_MCS_FLAGS = -d:NET_4_0 -d:NET_4_5 -d:MONO -nowarn:1699 -nostdlib $(DEFAULT_REFERENCES)
NO_SIGN_ASSEMBLY = yes
NO_TEST = yes

View File

@@ -10,8 +10,8 @@ MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARAT
profile-check:
@:
DEFAULT_REFERENCES = -r:mscorlib.dll
PROFILE_MCS_FLAGS = -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -d:DISABLE_CAS_USE -nowarn:1699 -nostdlib -lib:$(topdir)/class/lib/$(PROFILE) $(DEFAULT_REFERENCES) $(PLATFORM_DEBUG_FLAGS)
DEFAULT_REFERENCES = -r:$(topdir)/class/lib/$(PROFILE)/mscorlib.dll
PROFILE_MCS_FLAGS = -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -nowarn:1699 -nostdlib $(DEFAULT_REFERENCES) $(PLATFORM_DEBUG_FLAGS)
FRAMEWORK_VERSION = 4.5
XBUILD_VERSION = 4.0

View File

@@ -2,6 +2,8 @@
include $(topdir)/build/profiles/net_4_x.make
PROFILE_MCS_FLAGS := $(PROFILE_MCS_FLAGS) -d:XBUILD_12 -d:MONO -d:DISABLE_CAS_USE -lib:$(topdir)/class/lib/net_4_x
PARENT_PROFILE = ../net_4_x/
DEFAULT_REFERENCES = -r:$(topdir)/class/lib/net_4_x/mscorlib.dll
PROFILE_MCS_FLAGS := $(PROFILE_MCS_FLAGS) -d:XBUILD_12
XBUILD_VERSION = 12.0

View File

@@ -1,7 +1,7 @@
# -*- makefile -*-
include $(topdir)/build/profiles/net_4_x.make
include $(topdir)/build/profiles/xbuild_12.make
PROFILE_MCS_FLAGS := $(PROFILE_MCS_FLAGS) -d:XBUILD_12 -d:XBUILD_14 -d:MONO -d:DISABLE_CAS_USE -lib:$(topdir)/class/lib/net_4_x
PROFILE_MCS_FLAGS := $(PROFILE_MCS_FLAGS) -d:XBUILD_14
XBUILD_VERSION = 14.0

View File

@@ -43,10 +43,12 @@ MKINSTALLDIRS = $(SHELL) $(topdir)/mkinstalldirs
INTERNAL_MBAS = $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/mbas/mbas.exe
INTERNAL_GMCS = $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)/mcs.exe
INTERNAL_ILASM = $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(PROFILE)/ilasm.exe
corlib = mscorlib.dll
INTERNAL_CSC = $(RUNTIME) $(RUNTIME_FLAGS) $(CSC_LOCATION)
INTERNAL_RESGEN = $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(PROFILE)/resgen.exe
RESGEN = MONO_PATH="$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_RESGEN)
RESGEN_EXE = $(topdir)/class/lib/$(PROFILE)/$(PARENT_PROFILE)resgen.exe
INTERNAL_RESGEN = $(RUNTIME) $(RUNTIME_FLAGS) $(RESGEN_EXE)
RESGEN = MONO_PATH="$(topdir)/class/lib/$(PROFILE)/$(PARENT_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_RESGEN)
STRING_REPLACER = MONO_PATH="$(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)/cil-stringreplacer.exe
depsdir = $(topdir)/build/deps
@@ -60,7 +62,6 @@ export CC
export CFLAGS
export INSTALL
export MKINSTALLDIRS
export TEST_HARNESS
export BOOTSTRAP_MCS
export DESTDIR
export RESGEN
@@ -76,6 +77,7 @@ default: all
include $(topdir)/build/config-default.make
-include $(topdir)/build/pre-config.make
-include $(topdir)/build/config.make
# Default PLATFORM and PROFILE if they're not already defined.
@@ -113,16 +115,79 @@ PROFILE = $(DEFAULT_PROFILE)
endif
include $(topdir)/build/profiles/$(PROFILE).make
-include $(topdir)/build/config.make
# If the profile is using nunit-lite, use it
ifdef NUNIT_LITE
TEST_HARNESS=$(topdir)/class/lib/$(PROFILE)/nunit-lite-console.exe
endif
# Make sure propagates
export TEST_HARNESS
# If the profile is using nunit-lite, use it
ifdef NUNIT_LITE
TEST_HARNESS=$(topdir)/class/lib/$(PROFILE)/nunit-lite-console.exe
endif
# Make sure propagates
export TEST_HARNESS
# start aot config
# We set the prefix of the aot build flags
# in the profile. This determines the aot type,
# whether it be llvmonly or full. To this we append the
# options which do not change between them, the INVARIANT_AOT_OPTIONS
ifndef AOT_BUILD_FLAGS_PREFIX
AOT_BUILD_FLAGS_PREFIX = --aot=
endif
# Set the options for building and running AOT
# The trampoline numbers are provisional, they are what is required
# to run the corlib test suite. They should be considered a lower bound.
INVARIANT_AOT_OPTIONS=nimt-trampolines=900,ntrampolines=8000
ifndef MONO_DISABLE_GSHAREDVT
INVARIANT_AOT_OPTIONS:=$(INVARIANT_AOT_OPTIONS),ngsharedvt-trampolines=900
endif
AOT_BUILD_FLAGS = $(AOT_BUILD_FLAGS_PREFIX)$(INVARIANT_AOT_OPTIONS)
# end AOT config
ifdef BCL_OPTIMIZE
PROFILE_MCS_FLAGS += -optimize
endif
# Design:
# Problem: We want to be able to build aot
# assemblies as part of the build system.
#
# For this to be done safely, we really need two passes. This
# ensures that all of the .dlls are compiled before trying to
# aot them. Because we want this to be the
# default target for some profiles(mobile_static) we have a
# two-level build system. The do-all-aot target is what
# gets invoked at the top-level when someone tries to build with aot.
# It will invoke the do-all target, and will set TOP_LEVEL_DO for this
# recursive make call in order to prevent this recursive call from trying
# to build aot in each of the subdirs. After this is done, we will aot
# everything that our building produced by aoting everything in
# mcs/class/lib/$(PROFILE)/
ifndef TOP_LEVEL_DO
ifdef ALWAYS_AOT
TOP_LEVEL_DO = do-all-aot
else
TOP_LEVEL_DO = do-all
endif # ALWAYS_AOT
endif # !TOP_LEVEL_DO
ifdef OVERRIDE_TARGET_ALL
all: all.override
else
all: do-all
all: $(TOP_LEVEL_DO)
endif
ifdef NO_INSTALL
@@ -136,6 +201,19 @@ STD_TARGETS = test run-test run-test-ondotnet clean install uninstall doc-update
$(STD_TARGETS): %: do-%
ifdef PLATFORM_AOT_SUFFIX
Q_AOT=$(if $(V),,@echo "AOT [$(PROFILE)] AOT All Assemblies";)
LIST_ALL_PROFILE_ASSEMBLIES = find . | grep -E '(dll|exe)$$' | grep -v -E 'bare|plaincore|secxml|Facades'
COMPILE_ALL_PROFILE_ASSEMBLIES = $(LIST_ALL_PROFILE_ASSEMBLIES) | MONO_PATH="./" xargs -I '{}' $(RUNTIME) $(RUNTIME_FLAGS) $(AOT_BUILD_FLAGS) '{}'
do-all-aot:
$(MAKE) do-all TOP_LEVEL_DO=do-all
$(MAKE) aot-all-profile
aot-all-profile:
$(Q_AOT) cd $(topdir)/class/lib/$(PROFILE)/ && $(COMPILE_ALL_PROFILE_ASSEMBLIES) &> $(PROFILE)-aot.log
endif
do-run-test:
ok=:; $(MAKE) run-test-recursive || ok=false; $(MAKE) run-test-local || ok=false; $$ok

View File

@@ -18,31 +18,60 @@ TEST_RUNTIME_WRAPPERS_PATH = $(shell dirname $(RUNTIME))/_tmpinst/bin
## Unit test support
ifndef NO_TEST
ifdef NUNIT_LITE
test_nunit_lib = nunitlite.dll
else
test_nunit_lib = nunit.framework.dll nunit.core.dll nunit.util.dll nunit.mocks.dll
test_nunit_dep = $(test_nunit_lib:%=$(topdir)/class/lib/$(PROFILE)/%)
endif
TEST_LIB_MCS_FLAGS = $(patsubst %,-r:$(topdir)/class/lib/$(PROFILE)/%.dll,$(TEST_LIB_REFS))
test_nunit_dep = $(test_nunit_lib:%=$(topdir)/class/lib/$(PROFILE)/$(PARENT_PROFILE)%)
test_nunit_ref = $(test_nunit_dep:%=-r:%)
tests_CLEAN_FILES += TestResult*.xml
test_lib = $(ASSEMBLY:$(ASSEMBLY_EXT)=_test_$(PROFILE).dll)
test_sourcefile = $(PROFILE)_$(ASSEMBLY:$(ASSEMBLY_EXT)=_test.dll.sources)
ifeq ($(wildcard $(test_sourcefile)),)
test_sourcefile = $(ASSEMBLY:$(ASSEMBLY_EXT)=_test.dll.sources)
endif
test_lib = $(PROFILE)_$(ASSEMBLY:$(ASSEMBLY_EXT)=_test.dll)
test_sourcefile_excludes = $(test_lib).exclude.sources
test_pdb = $(test_lib:.dll=.pdb)
test_response = $(depsdir)/$(test_lib).response
test_makefrag = $(depsdir)/$(test_lib).makefrag
test_flags = -r:$(the_assembly) $(test_nunit_ref) $(TEST_MCS_FLAGS)
test_flags = -r:$(the_assembly) $(test_nunit_ref) $(TEST_MCS_FLAGS) $(TEST_LIB_MCS_FLAGS)
tests_CLEAN_FILES += $(ASSEMBLY:$(ASSEMBLY_EXT)=_test*.dll) $(ASSEMBLY:$(ASSEMBLY_EXT)=_test*.pdb) $(test_response) $(test_makefrag)
ifndef HAVE_CS_TESTS
HAVE_CS_TESTS := $(wildcard $(test_sourcefile))
endif
endif
HAVE_SOURCE_EXCLUDES := $(wildcard $(test_sourcefile_excludes))
endif # !NO_TEST
ifndef NO_TEST
$(test_nunit_dep): $(topdir)/build/deps/nunit-$(PROFILE).stamp
@if test -f $@; then :; else rm -f $<; $(MAKE) $<; fi
ifdef NUNIT_LITE
$(topdir)/build/deps/nunit-$(PROFILE).stamp:
cd ${topdir}/nunit24 && $(MAKE)
ifndef PARENT_PROFILE
cd ${topdir}/tools/nunit-lite && $(MAKE)
endif
echo "stamp" >$@
else
$(topdir)/build/deps/nunit-$(PROFILE).stamp:
ifndef PARENT_PROFILE
cd ${topdir}/nunit24 && $(MAKE)
endif
echo "stamp" >$@
endif
tests_CLEAN_FILES += $(topdir)/build/deps/nunit-$(PROFILE).stamp
endif
@@ -58,8 +87,28 @@ test-local: $(test_assemblies)
run-test-local: run-test-lib
run-test-ondotnet-local: run-test-ondotnet-lib
TEST_HARNESS_EXCLUDES = -exclude=$(PLATFORM_TEST_HARNESS_EXCLUDES)NotWorking,ValueAdd,CAS,InetAccess
TEST_HARNESS_EXCLUDES_ONDOTNET = /exclude:$(PLATFORM_TEST_HARNESS_EXCLUDES)NotDotNet,CAS
TEST_HARNESS_EXCLUDES = -exclude=$(PLATFORM_TEST_HARNESS_EXCLUDES)$(PROFILE_TEST_HARNESS_EXCLUDES)NotWorking,ValueAdd,CAS,InetAccess
TEST_HARNESS_EXCLUDES_ONDOTNET = /exclude:$(PLATFORM_TEST_HARNESS_EXCLUDES)$(PROFILE_TEST_HARNESS_EXCLUDES)NotDotNet,CAS
ifdef NUNIT_LITE
NOSHADOW_FLAG =
NUNIT_XML_FLAG = -format:nunit2 -result:
OUTPUT_FILE_FLAG=-out
else
OUTPUT_FILE_FLAG=-output
NOSHADOW_FLAG = -noshadow
NUNIT_XML_FLAG = -xml=
endif
ifdef NUNIT_LITE
NOSHADOW_FLAG =
NUNIT_XML_FLAG = -format:nunit2 -result:
OUTPUT_FILE_FLAG=-out
else
OUTPUT_FILE_FLAG=-output
NOSHADOW_FLAG = -noshadow
NUNIT_XML_FLAG = -xml=
endif
ifdef TEST_HARNESS_VERBOSE
TEST_HARNESS_OUTPUT = -labels
@@ -67,8 +116,8 @@ TEST_HARNESS_OUTPUT_ONDOTNET = -labels
TEST_HARNESS_POSTPROC = :
TEST_HARNESS_POSTPROC_ONDOTNET = :
else
TEST_HARNESS_OUTPUT = -output=TestResult-$(PROFILE).log
TEST_HARNESS_OUTPUT_ONDOTNET = -output=TestResult-ondotnet-$(PROFILE).log
TEST_HARNESS_OUTPUT = $(OUTPUT_FILE_FLAG)=TestResult-$(PROFILE).log
TEST_HARNESS_OUTPUT_ONDOTNET = $(OUTPUT_FILE_FLAG)=TestResult-ondotnet-$(PROFILE).log
TEST_HARNESS_POSTPROC = (echo ''; cat TestResult-$(PROFILE).log) | sed '1,/^Tests run: /d'; xsltproc $(topdir)/build/nunit-summary.xsl TestResult-$(PROFILE).xml >> TestResult-$(PROFILE).log
TEST_HARNESS_POSTPROC_ONDOTNET = (echo ''; cat TestResult-ondotnet-$(PROFILE).log) | sed '1,/^Tests run: /d'; xsltproc $(topdir)/build/nunit-summary.xsl TestResult-ondotnet-$(PROFILE).xml >> TestResult-ondotnet-$(PROFILE).log
endif
@@ -81,10 +130,19 @@ ifdef TESTNAME
TESTNAME_ARG = -run=MonoTests.$(TESTNAME)
endif
ifdef ALWAYS_AOT
test-local-aot-compile: $(topdir)/build/deps/nunit-$(PROFILE).stamp
PATH="$(TEST_RUNTIME_WRAPPERS_PATH):$(PATH)" MONO_REGISTRY_PATH="$(HOME)/.mono/registry" MONO_TESTS_IN_PROGRESS="yes" $(TEST_RUNTIME) $(RUNTIME_FLAGS) $(AOT_BUILD_FLAGS) $(test_assemblies)
else
test-local-aot-compile: $(topdir)/build/deps/nunit-$(PROFILE).stamp
endif # ALWAYS_AOT
## FIXME: i18n problem in the 'sed' command below
run-test-lib: test-local
run-test-lib: test-local test-local-aot-compile
ok=:; \
PATH="$(TEST_RUNTIME_WRAPPERS_PATH):$(PATH)" MONO_REGISTRY_PATH="$(HOME)/.mono/registry" MONO_TESTS_IN_PROGRESS="yes" $(TEST_RUNTIME) $(RUNTIME_FLAGS) $(TEST_HARNESS) $(test_assemblies) -noshadow $(TEST_HARNESS_FLAGS) $(LOCAL_TEST_HARNESS_FLAGS) $(TEST_HARNESS_EXCLUDES) $(TEST_HARNESS_OUTPUT) -xml=TestResult-$(PROFILE).xml $(FIXTURE_ARG) $(TESTNAME_ARG)|| ok=false; \
PATH="$(TEST_RUNTIME_WRAPPERS_PATH):$(PATH)" MONO_REGISTRY_PATH="$(HOME)/.mono/registry" MONO_TESTS_IN_PROGRESS="yes" $(TEST_RUNTIME) $(RUNTIME_FLAGS) $(AOT_RUN_FLAGS) $(TEST_HARNESS) $(test_assemblies) $(NOSHADOW_FLAG) $(TEST_HARNESS_FLAGS) $(LOCAL_TEST_HARNESS_FLAGS) $(TEST_HARNESS_EXCLUDES) $(TEST_HARNESS_OUTPUT) $(NUNIT_XML_FLAG)TestResult-$(PROFILE).xml $(FIXTURE_ARG) $(TESTNAME_ARG)|| ok=false; \
if [ ! -f "TestResult-$(PROFILE).xml" ]; then echo "<?xml version='1.0' encoding='utf-8'?><test-results failures='1' total='1' not-run='0' name='bcl-tests' date='$$(date +%F)' time='$$(date +%T)'><test-suite name='$(strip $(test_assemblies))' success='False' time='0'><results><test-case name='crash' executed='True' success='False' time='0'><failure><message>The test runner didn't produce a test result XML, probably due to a crash of the runtime. Check the log for more details.</message><stack-trace></stack-trace></failure></test-case></results></test-suite></test-results>" > TestResult-$(PROFILE).xml; fi; \
$(TEST_HARNESS_POSTPROC) ; $$ok
@@ -92,7 +150,7 @@ run-test-lib: test-local
run-test-ondotnet-lib: LOCAL_TEST_COMPILER_ONDOTNET_FLAGS:=-d:RUN_ONDOTNET
run-test-ondotnet-lib: test-local
ok=:; \
$(TEST_HARNESS) $(test_assemblies) -noshadow $(TEST_HARNESS_FLAGS) $(LOCAL_TEST_HARNESS_ONDOTNET_FLAGS) $(TEST_HARNESS_EXCLUDES_ONDOTNET) $(TEST_HARNESS_OUTPUT_ONDOTNET) -xml=TestResult-ondotnet-$(PROFILE).xml $(FIXTURE_ARG) $(TESTNAME_ARG) || ok=false; \
$(TEST_HARNESS) $(test_assemblies) $(NOSHADOW_FLAG) $(TEST_HARNESS_FLAGS) $(LOCAL_TEST_HARNESS_ONDOTNET_FLAGS) $(TEST_HARNESS_EXCLUDES_ONDOTNET) $(TEST_HARNESS_OUTPUT_ONDOTNET) $(NUNIT_XML_FLAG)=TestResult-ondotnet-$(PROFILE).xml $(FIXTURE_ARG) $(TESTNAME_ARG) || ok=false; \
$(TEST_HARNESS_POSTPROC_ONDOTNET) ; $$ok
@@ -109,9 +167,16 @@ ifdef HAVE_CS_TESTS
$(test_lib): $(the_assembly) $(test_response) $(test_nunit_dep)
$(TEST_COMPILE) $(LIBRARY_FLAGS) -target:library -out:$@ $(test_flags) $(LOCAL_TEST_COMPILER_ONDOTNET_FLAGS) @$(test_response)
$(test_response): $(test_sourcefile)
test_response_preprocessed = $(test_response)_preprocessed
# This handles .excludes/.sources pairs, as well as resolving the
# includes that occur in .sources files
$(test_response_preprocessed): $(test_sourcefile)
$(SHELL) $(topdir)/build/gensources.sh $@ '$(test_sourcefile)' '$(test_sourcefile_excludes)'
$(test_response): $(test_response_preprocessed)
# @echo Creating $@ ...
@sed -e '/^$$/d' -e 's,^,Test/,' $(test_sourcefile) | $(PLATFORM_CHANGE_SEPARATOR_CMD) >$@
@sed -e '/^$$/d' -e 's,^,Test/,' $(test_response_preprocessed) | $(PLATFORM_CHANGE_SEPARATOR_CMD) >$@
$(test_makefrag): $(test_response)
# @echo Creating $@ ...