Merge pull request #4540 from kumpera/android-changes-part1
authorRodrigo Kumpera <kumpera@users.noreply.github.com>
Wed, 29 Mar 2017 15:46:29 +0000 (11:46 -0400)
committerGitHub <noreply@github.com>
Wed, 29 Mar 2017 15:46:29 +0000 (11:46 -0400)
[bcl+runtime] Multiple small cleanups to Android.

1  2 
configure.ac
mcs/build/tests.make
mcs/class/Makefile

diff --combined configure.ac
index cd1b684b80e319c0d26290af36f29eb02f05f5df,482660fb3d343b4601fe762e9ce84fadf8213e15..bb1aecfa5ee583c8f59ec299599ca8582c06c7cb
@@@ -1,7 -1,8 +1,7 @@@
  # Process this file with autoconf to produce a configure script.
  #AC_PREREQ([2.62])
  
 -# when bumping version number below, keep it in sync with man/mono.1 too
 -AC_INIT(mono, [4.9.1],
 +AC_INIT(mono, [5.1.0],
          [http://bugzilla.xamarin.com/enter_bug.cgi?classification=Mono])
  
  AC_CONFIG_SRCDIR([README.md])
@@@ -28,24 -29,6 +28,24 @@@ AC_PROG_LN_
  
  m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
  
 +MONO_VERSION_MAJOR=`echo $VERSION | cut -d . -f 1`
 +MONO_VERSION_MINOR=`echo $VERSION | cut -d . -f 2`
 +MONO_VERSION_BUILD=`echo $VERSION | cut -d . -f 3`
 +
 +# This is the version number of the corlib-runtime interface. When
 +# making changes to this interface (by changing the layout
 +# of classes the runtime knows about, changing icall signature or
 +# semantics etc), increment this variable.
 +#
 +# This can be reset to 0 when Mono's version number is bumped
 +# since it's part of the corlib version (the prefix '1' in the full
 +# version number is to ensure the number isn't treated as octal in C)
 +MONO_CORLIB_COUNTER=1
 +MONO_CORLIB_VERSION=`printf "1%02d%02d%02d%03d" $MONO_VERSION_MAJOR $MONO_VERSION_MINOR $MONO_VERSION_BUILD $MONO_CORLIB_COUNTER`
 +
 +AC_DEFINE_UNQUOTED(MONO_CORLIB_VERSION,$MONO_CORLIB_VERSION,[Version of the corlib-runtime interface])
 +AC_SUBST(MONO_CORLIB_VERSION)
 +
  case $host_os in
  *cygwin* )
                 echo "Run configure using ./configure --host=i686-pc-mingw32"
@@@ -233,9 -216,6 +233,6 @@@ case "$host" i
                CFLAGS="$CFLAGS -DPAGE_SIZE=4096 -DS_IWRITE=S_IWUSR"
                CXXFLAGS="$CXXFLAGS -DPAGE_SIZE=4096 -DS_IWRITE=S_IWUSR"
  
-               # The configure check can't detect this
-               AC_DEFINE(HAVE_LARGE_FILE_SUPPORT, 1, [Have large file support])
                # to bypass the underscore linker check, can't work when cross-compiling
                mono_cv_uscore=yes
                mono_cv_clang=no
@@@ -4442,7 -4422,6 +4439,7 @@@ mono/tests/Makefil
  mono/tests/tests-config
  mono/tests/assemblyresolve/Makefile
  mono/tests/gc-descriptors/Makefile
 +mono/tests/testing_gac/Makefile
  mono/unit-tests/Makefile
  mono/benchmark/Makefile
  mono/mini/Makefile
      }')]
  
      echo "MONO_VERSION = $myver" >> $mcs_topdir/build/config.make
 +    echo "MONO_CORLIB_VERSION = $MONO_CORLIB_VERSION" >> $mcs_topdir/build/config.make
  
      if test x$host_darwin = xyes; then
        echo "PLATFORM = darwin" >> $mcs_topdir/build/config.make
diff --combined mcs/build/tests.make
index cb68f8abddafdeedfebae274606cb1a727e51f0a,0f7992c51fd2cbd1c1ce71d726ddfca7f865ab29..45c77ebda49466d3a905a36e3f06f97e4e9d80cd
@@@ -20,18 -20,8 +20,18 @@@ TEST_RUNTIME_WRAPPERS_PATH = $(shell di
  ifndef NO_TEST
  
  test_nunit_lib = nunitlite.dll
 +xunit_core := xunit.core xunit.abstractions xunit.assert
 +xunit_deps := System.Runtime
 +xunit_class_deps := Xunit.NetCore.Extensions
 +
 +xunit_libs_ref = $(patsubst %,-r:$(topdir)/../external/xunit-binaries/%.dll,$(xunit_core))
 +xunit_libs_ref += $(patsubst %,-r:$(topdir)/class/lib/$(PROFILE)/Facades/%.dll,$(xunit_deps))
 +
 +xunit_libs_dep = $(xunit_class_deps:%=$(topdir)/class/lib/$(PROFILE)/$(PARENT_PROFILE)%.dll)
 +xunit_libs_ref += $(xunit_libs_dep:%=-r:%)
  
  TEST_LIB_MCS_FLAGS = $(patsubst %,-r:$(topdir)/class/lib/$(PROFILE)/%.dll,$(TEST_LIB_REFS))
 +XTEST_LIB_MCS_FLAGS = $(patsubst %,-r:$(topdir)/class/lib/$(PROFILE)/%.dll,$(XTEST_LIB_REFS))
  
  test_nunit_dep = $(test_nunit_lib:%=$(topdir)/class/lib/$(PROFILE)/$(PARENT_PROFILE)%)
  test_nunit_ref = $(test_nunit_dep:%=-r:%)
@@@ -44,7 -34,6 +44,7 @@@ test_sourcefile = $(ASSEMBLY:$(ASSEMBLY
  endif
  
  test_lib = $(PROFILE)_$(ASSEMBLY:$(ASSEMBLY_EXT)=_test.dll)
 +
  test_sourcefile_excludes = $(test_lib).exclude.sources
  
  test_pdb = $(test_lib:.dll=.pdb)
@@@ -53,26 -42,12 +53,26 @@@ test_makefrag = $(depsdir)/$(test_lib).
  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)
  
 +xtest_sourcefile = $(PROFILE)_$(ASSEMBLY:$(ASSEMBLY_EXT)=_xtest.dll.sources)
 +
 +ifeq ($(wildcard $(xtest_sourcefile)),)
 +xtest_sourcefile = $(ASSEMBLY:$(ASSEMBLY_EXT)=_xtest.dll.sources)
 +endif
 +
 +xunit_test_lib = $(PROFILE)_$(ASSEMBLY:$(ASSEMBLY_EXT)=_xunit-test.dll)
 +
 +xtest_response = $(depsdir)/$(xtest_lib).response
 +xtest_makefrag = $(depsdir)/$(xtest_lib).makefrag
 +xtest_flags = -r:$(the_assembly) $(xunit_libs_ref) $(XTEST_MCS_FLAGS) $(XTEST_LIB_MCS_FLAGS)
 +
  ifndef HAVE_CS_TESTS
  HAVE_CS_TESTS := $(wildcard $(test_sourcefile))
  endif
  
  HAVE_SOURCE_EXCLUDES := $(wildcard $(test_sourcefile_excludes))
  
 +HAVE_CS_XTESTS := $(wildcard $(xtest_sourcefile))
 +
  endif # !NO_TEST
  
  ifndef NO_TEST
@@@ -86,10 -61,6 +86,10 @@@ endi
        echo "stamp" >$@
  
  tests_CLEAN_FILES += $(topdir)/build/deps/nunit-$(PROFILE).stamp
 +
 +$(topdir)/class/lib/$(PROFILE)/$(PARENT_PROFILE)Xunit.NetCore.Extensions.dll:
 +      $(MAKE) -C $(topdir)/class/Xunit.NetCore.Extensions
 +
  endif
  
  test_assemblies :=
@@@ -186,54 -157,9 +186,57 @@@ $(test_makefrag): $(test_response
  
  -include $(test_makefrag)
  
+ build-test-lib: $(test_lib)
+       @echo Building testing lib
  endif
  
 +
 +ifdef HAVE_CS_XTESTS
 +
 +XTEST_HARNESS_PATH = $(topdir)/../external/xunit-binaries
 +XTEST_HARNESS = $(XTEST_HARNESS_PATH)/xunit.console.exe
 +XTEST_HARNESS_FLAGS := -noappdomain -noshadow -parallel none -nunit TestResult-$(PROFILE)-xunit.xml
 +XTEST_TRAIT := -notrait category=failing -notrait category=nonnetcoreapptests -notrait Benchmark=true -notrait category=outerloop
 +
 +ifdef FIXTURE
 +XTEST_HARNESS_FLAGS += -class $(FIXTURE)
 +endif
 +
 +ifdef TESTNAME
 +XTEST_HARNESS_FLAGS += -method $(TESTNAME)
 +endif
 +
 +check: run-xunit-test-local
 +run-xunit-test: run-xunit-test-local
 +xunit-test-local: $(xunit_test_lib)
 +run-xunit-test-local: run-xunit-test-lib
 +
 +# ln -s is a HACK for xunit runner to require xunit.execution.desktop.dll file in local folder on .net only
 +run-xunit-test-lib: xunit-test-local
 +      @ln -fs $(XTEST_HARNESS_PATH)/xunit.execution.desktop.dll xunit.execution.desktop.dll
 +      ok=:; \
 +      PATH="$(TEST_RUNTIME_WRAPPERS_PATH):$(PATH)" $(TEST_RUNTIME) $(RUNTIME_FLAGS) $(AOT_RUN_FLAGS) $(XTEST_HARNESS) $(xunit_test_lib) $(XTEST_HARNESS_FLAGS) $(XTEST_TRAIT) || ok=false; \
 +      $$ok
 +      @rm -f xunit.execution.desktop.dll
 +
 +$(xunit_test_lib): $(the_assembly) $(xtest_response) $(xunit_libs_dep)
 +      $(TEST_COMPILE) $(LIBRARY_FLAGS) $(XTEST_LIB_FLAGS) -target:library -out:$@ $(xtest_flags) @$(xtest_response)
 +
 +xtest_response_preprocessed = $(xtest_response)_preprocessed
 +
 +# This handles .excludes/.sources pairs, as well as resolving the
 +# includes that occur in .sources files
 +$(xtest_response): $(xtest_sourcefile)
 +      $(SHELL) $(topdir)/build/gensources.sh $@ '$(xtest_sourcefile)' '$(xtest_sourcefile_excludes)'
 +
 +$(xtest_makefrag): $(xtest_response)
 +      @echo Creating $@ ...
 +      @sed 's,^,$(xunit_test_lib): ,' $< >$@
 +
 +-include $(xtest_makefrag)
 +
 +endif
 +
 +
  .PHONY: patch-nunitlite-appconfig
diff --combined mcs/class/Makefile
index 3016300230ec3394807c44fd1264c78e0f47286c,76690a9eb3360d62878738605386850125ba67e6..3f981f77aba50c4f2f1a4a430cff729bf516cc23
@@@ -111,6 -111,7 +111,7 @@@ monodroid_dirs := 
        $(mobile_common_dirs)   \
        Mono.CompilerServices.SymbolWriter      \
        Mono.Btls.Interface     \
+       Mono.Posix      \
        $(pcl_facade_dirs)
  
  monotouch_dirs := \
@@@ -425,11 -426,6 +426,11 @@@ $(build_files:%=lib/build/%)
  
  dist-monolite: $(monolite_files) lib/$(monolite_dir)/mcs.exe
  
 +package-monolite-latest:
 +      MONOLITE=monolite-$(MONO_CORLIB_VERSION)-latest; \
 +      $(MAKE) dist-monolite monolite_dir=$$MONOLITE; \
 +      tar zcvpf $$MONOLITE.tar.gz --directory=lib $$MONOLITE/
 +
  dist-default: dist-monolite
  
  dist-local: dist-default