mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-19 01:31:17 -10:00
Compare commits
100
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
db33692ca0 | ||
|
|
10feb7c1d8 | ||
|
|
4d38f69507 | ||
|
|
7344e17620 | ||
|
|
ea8a24b1bb | ||
|
|
a5b924fa68 | ||
|
|
34396522f3 | ||
|
|
dd6e11936b | ||
|
|
e81726eb29 | ||
|
|
c7a91c01fa | ||
|
|
c6b39a0614 | ||
|
|
99af4a9eda | ||
|
|
75be2e6537 | ||
|
|
9273efd973 | ||
|
|
8eb8f7d5e7 | ||
|
|
c6a8c0e38a | ||
|
|
c2e1021ed0 | ||
|
|
29bbcfb022 | ||
|
|
2cc6bede97 | ||
|
|
16cad3ccd4 | ||
|
|
8605da46f5 | ||
|
|
d194b8fd4d | ||
|
|
a749680783 | ||
|
|
b4e428d7c4 | ||
|
|
1cb70ef771 | ||
|
|
00f930c13d | ||
|
|
911b32aef0 | ||
|
|
82306753f9 | ||
|
|
edabe88417 | ||
|
|
12304ec458 | ||
|
|
9340ebefcd | ||
|
|
32031273ec | ||
|
|
083c130d4a | ||
|
|
b149c23832 | ||
|
|
8aa3f6182f | ||
|
|
db135e42db | ||
|
|
de7bff2994 | ||
|
|
28f285b972 | ||
|
|
9b8ba28bac | ||
|
|
3c76d261e1 | ||
|
|
b932a792d8 | ||
|
|
34c3d019ed | ||
|
|
6c4c039c9b | ||
|
|
4de0fb710b | ||
|
|
c45f358856 | ||
|
|
bf27e25446 | ||
|
|
4e276971c0 | ||
|
|
1075824929 | ||
|
|
2dbce94d6f | ||
|
|
1f09e9af88 | ||
|
|
847a2de1d0 | ||
|
|
beb137dd79 | ||
|
|
d95eaa61b1 | ||
|
|
f3a6da6d94 | ||
|
|
264e0d4bb2 | ||
|
|
2eba668040 | ||
|
|
607e20ee6c | ||
|
|
47631c34a7 | ||
|
|
942eb2b779 | ||
|
|
225ba3efa4 | ||
|
|
7bdd7b1738 | ||
|
|
42672fbcb2 | ||
|
|
129dc324e7 | ||
|
|
dac6077561 | ||
|
|
3141c9490d | ||
|
|
e3466bc325 | ||
|
|
a7adb18ce2 | ||
|
|
131c3dd675 | ||
|
|
c836aa14af | ||
|
|
5dae72b19b | ||
|
|
4050681098 | ||
|
|
ef8ab4986a | ||
|
|
266326d7c2 | ||
|
|
89cc3619d5 | ||
|
|
05453b1c80 | ||
|
|
0938bbc98c | ||
|
|
c06eb62b14 | ||
|
|
0fb02c88cd | ||
|
|
d4aa545f56 | ||
|
|
ff7f5576d2 | ||
|
|
d5d67eab6a | ||
|
|
15d76bf5e2 | ||
|
|
f3ac8fdeb3 | ||
|
|
1f48672a90 | ||
|
|
becded2606 | ||
|
|
d21cb0853b | ||
|
|
f7f359a2dd | ||
|
|
607cbde47a | ||
|
|
85fb6bce10 | ||
|
|
78136c4a90 | ||
|
|
b4c45099fb | ||
|
|
70837feda9 | ||
|
|
c2728d29f7 | ||
|
|
54b2e194f3 | ||
|
|
10f1f84138 | ||
|
|
e1ff841329 | ||
|
|
46912f8f80 | ||
|
|
3f4f070d3d | ||
|
|
331f927bfe | ||
|
|
da6a45a158 |
No files matched your search
+2
-8
@@ -11,15 +11,9 @@ else
|
||||
tools_dir = tools
|
||||
endif
|
||||
|
||||
if BUILD_SUPPORT
|
||||
support_dir = support
|
||||
else
|
||||
support_dir =
|
||||
endif
|
||||
|
||||
SUBDIRS = po $(libgc_dir) mono $(ikvm_native_dir) $(support_dir) data runtime scripts man samples $(tools_dir) msvc $(docs_dir) acceptance-tests llvm
|
||||
SUBDIRS = po $(libgc_dir) mono $(ikvm_native_dir) support data runtime scripts man samples $(tools_dir) msvc $(docs_dir) acceptance-tests llvm
|
||||
# Keep in sync with SUBDIRS
|
||||
DIST_SUBDIRS = m4 po $(libgc_dir) mono ikvm-native $(support_dir) data runtime scripts man samples tools msvc docs acceptance-tests llvm
|
||||
DIST_SUBDIRS = m4 po $(libgc_dir) mono ikvm-native support data runtime scripts man samples tools msvc docs acceptance-tests llvm
|
||||
|
||||
all: update_submodules
|
||||
|
||||
|
||||
+35
-3
@@ -1,7 +1,7 @@
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
#AC_PREREQ([2.62])
|
||||
|
||||
AC_INIT(mono, [5.10.0],
|
||||
AC_INIT(mono, [5.10.1],
|
||||
[http://bugzilla.xamarin.com/enter_bug.cgi?classification=Mono])
|
||||
|
||||
AC_CONFIG_SRCDIR([README.md])
|
||||
@@ -40,7 +40,7 @@ MONO_VERSION_BUILD=`echo $VERSION | cut -d . -f 3`
|
||||
# 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=2
|
||||
MONO_CORLIB_COUNTER=4
|
||||
MONO_CORLIB_VERSION=`printf "1%02d%02d%02d%03d" $MONO_VERSION_MAJOR $MONO_VERSION_MINOR 0 $MONO_CORLIB_COUNTER`
|
||||
|
||||
AC_DEFINE_UNQUOTED(MONO_CORLIB_VERSION,$MONO_CORLIB_VERSION,[Version of the corlib-runtime interface])
|
||||
@@ -1545,6 +1545,33 @@ if test x$platform_android = xyes; then
|
||||
fi
|
||||
|
||||
if test x$host_win32 = xno; then
|
||||
dnl *************************************
|
||||
dnl *** Checks for time capabilities ***
|
||||
dnl *************************************
|
||||
|
||||
AC_MSG_CHECKING(for CLOCK_MONOTONIC)
|
||||
AC_TRY_COMPILE([#include <time.h>], [
|
||||
const int foo = CLOCK_MONOTONIC;
|
||||
],[
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_CLOCK_MONOTONIC, 1, [CLOCK_MONOTONIC])
|
||||
], [
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
|
||||
AC_MSG_CHECKING(for CLOCK_MONOTONIC_COARSE)
|
||||
AC_TRY_COMPILE([#include <time.h>], [
|
||||
const int foo = CLOCK_MONOTONIC_COARSE;
|
||||
],[
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_CLOCK_MONOTONIC_COARSE, 1, [CLOCK_MONOTONIC_COARSE])
|
||||
], [
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
|
||||
AC_CHECK_FUNC(mach_absolute_time, [AC_DEFINE(HAVE_MACH_ABSOLUTE_TIME, 1, [mach_absolute_time])])
|
||||
AC_CHECK_FUNC(gethrtime, [AC_DEFINE(HAVE_GETHRTIME, 1, [gethrtime])])
|
||||
AC_CHECK_FUNC(read_real_time, [AC_DEFINE(HAVE_READ_REAL_TIME, 1, [read_real_time])])
|
||||
|
||||
dnl hires monotonic clock support
|
||||
AC_SEARCH_LIBS(clock_gettime, rt)
|
||||
@@ -4354,9 +4381,14 @@ dnl *** Btls ***
|
||||
dnl **************
|
||||
|
||||
AC_ARG_ENABLE(btls, [ --disable-btls Disable the BoringTls provider], enable_btls=$enableval, enable_btls=$BTLS_SUPPORTED)
|
||||
AC_ARG_ENABLE(btls-lib, [ --disable-btls-lib Disable building the BTLS native library], enable_btls_lib=$enableval, enable_btls_lib=$BTLS_SUPPORTED)
|
||||
AC_ARG_WITH(btls_android_ndk, [ --with-btls-android-ndk Android NDK for BoringTls])
|
||||
|
||||
AM_CONDITIONAL(BTLS, test x$enable_btls = xyes)
|
||||
if test "x$enable_btls" = "xno"; then
|
||||
enable_btls_lib=no
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(BTLS, test x$enable_btls_lib = xyes)
|
||||
|
||||
btls_android=no
|
||||
if test "x$enable_btls" = "xyes"; then
|
||||
|
||||
Vendored
+1
-1
Submodule external/api-snapshot updated: 4caa71212c...be2efbfa80.
Vendored
+1
-1
Submodule external/corefx updated: e327d2855e...f37e667108.
Vendored
+1
-1
Submodule external/nunit-lite updated: b7776829bb...70bb70b0ff.
@@ -0,0 +1,35 @@
|
||||
//
|
||||
// Copyright (c) 2018 Microsoft
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
[assembly: AssemblyTitle ("System.Drawing.Common")]
|
||||
[assembly: AssemblyDescription ("System.Drawing.Common")]
|
||||
[assembly: AssemblyDefaultAlias ("System.Drawing.Common")]
|
||||
[assembly: AssemblyCompany ("Mono development team")]
|
||||
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
|
||||
[assembly: AssemblyCopyright ("(c) Various Mono authors")]
|
||||
[assembly: AssemblyVersion ("4.0.0.0")]
|
||||
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
|
||||
[assembly: AssemblyFileVersion ("4.0.0.0")]
|
||||
@@ -0,0 +1,49 @@
|
||||
MCS_BUILD_DIR = ../../../build
|
||||
|
||||
thisdir = class/Facades/System.Drawing.Common
|
||||
SUBDIRS =
|
||||
include $(MCS_BUILD_DIR)/rules.make
|
||||
|
||||
LIBRARY_SUBDIR = Facades
|
||||
LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
|
||||
|
||||
LIBRARY = System.Drawing.Common.dll
|
||||
|
||||
KEYFILE = ../../Open.snk
|
||||
LIBRARY_SNK = $(KEYFILE)
|
||||
SIGN_FLAGS = /delaysign /nowarn:1616,1699
|
||||
LIB_REFS =
|
||||
LIB_MCS_FLAGS = $(SIGN_FLAGS) $(EXTRA_LIB_MCS_FLAGS)
|
||||
|
||||
ifdef false # we'll enable this at a later point
|
||||
|
||||
# xammac_net_4_5 and the testing_* profiles are special, they don't build
|
||||
# System.Drawing.dll or equivalent neither in Mono nor in the XM repo.
|
||||
# For now we embed the types directly here.
|
||||
# TODO: find a better solution.
|
||||
EMBEDDED_DRAWING_DEP := $(filter xammac_net_4_5 testing_aot_full testing_aot_hybrid, $(PROFILE))
|
||||
|
||||
ifndef EMBEDDED_DRAWING_DEP
|
||||
|
||||
# profiles which build a System.Drawing.dll in the repo
|
||||
REPO_DRAWING_DEP := $(filter net_4_x orbis winaot unreal wasm, $(PROFILE))
|
||||
|
||||
ifdef REPO_DRAWING_DEP
|
||||
LIB_REFS += System.Drawing
|
||||
else
|
||||
# When System.Drawing.dll is not built in the Mono repo but in
|
||||
# the product repo like in the XI/XA case we need to pass in a reference
|
||||
# to the assembly containing drawing types like Rectangle etc. from there.
|
||||
# This needs to be passed in via EXTERNAL_FACADE_DRAWING_REFERENCE.
|
||||
LIB_MCS_FLAGS += /r:$(EXTERNAL_FACADE_DRAWING_REFERENCE)
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
PLATFORM_DEBUG_FLAGS =
|
||||
|
||||
NO_TEST = yes
|
||||
|
||||
include $(MCS_BUILD_DIR)/library.make
|
||||
@@ -0,0 +1,2 @@
|
||||
TypeForwarders.cs
|
||||
AssemblyInfo.cs
|
||||
@@ -0,0 +1,174 @@
|
||||
//
|
||||
// Copyright (c) 2018 Microsoft
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
//
|
||||
|
||||
#if false // we'll enable these at a later point
|
||||
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Bitmap))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.BitmapSuffixInSameAssemblyAttribute))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.BitmapSuffixInSatelliteAssemblyAttribute))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Brush))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Brushes))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.BufferedGraphics))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.BufferedGraphicsContext))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.BufferedGraphicsManager))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.CharacterRange))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.ColorTranslator))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.ContentAlignment))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.CopyPixelOperation))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Design.CategoryNameCollection))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.AdjustableArrowCap))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.Blend))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.ColorBlend))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.CombineMode))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.CompositingMode))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.CompositingQuality))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.CoordinateSpace))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.CustomLineCap))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.DashCap))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.DashStyle))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.FillMode))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.FlushIntention))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.GraphicsContainer))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.GraphicsPath))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.GraphicsPathIterator))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.GraphicsState))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.HatchBrush))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.HatchStyle))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.InterpolationMode))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.LinearGradientBrush))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.LinearGradientMode))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.LineCap))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.LineJoin))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.Matrix))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.MatrixOrder))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.PathData))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.PathGradientBrush))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.PathPointType))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.PenAlignment))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.PenType))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.PixelOffsetMode))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.QualityMode))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.RegionData))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.SmoothingMode))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.WarpMode))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.WrapMode))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Font))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.FontFamily))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.FontStyle))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Graphics))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Graphics.DrawImageAbort))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Graphics.EnumerateMetafileProc))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.GraphicsUnit))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Icon))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.IDeviceContext))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Image))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Image.GetThumbnailImageAbort))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.ImageAnimator))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.BitmapData))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.ColorAdjustType))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.ColorChannelFlag))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.ColorMap))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.ColorMapType))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.ColorMatrix))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.ColorMatrixFlag))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.ColorMode))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.ColorPalette))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.EmfPlusRecordType))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.EmfType))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.Encoder))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.EncoderParameter))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.EncoderParameters))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.EncoderParameterValueType))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.EncoderValue))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.FrameDimension))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.ImageAttributes))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.ImageCodecFlags))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.ImageCodecInfo))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.ImageFlags))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.ImageFormat))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.ImageLockMode))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.Metafile))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.MetafileFrameUnit))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.MetafileHeader))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.MetafileType))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.MetaHeader))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.PaletteFlags))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.PixelFormat))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.PlayRecordCallback))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.PropertyItem))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.WmfPlaceableFileHeader))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Pen))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Pens))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.Duplex))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.InvalidPrinterException))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.Margins))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PageSettings))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PaperKind))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PaperSize))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PaperSource))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PaperSourceKind))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PreviewPageInfo))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PreviewPrintController))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PrintAction))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PrintController))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PrintDocument))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PrinterResolution))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PrinterResolutionKind))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PrinterSettings))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PrinterSettings.PaperSizeCollection))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PrinterSettings.PaperSourceCollection))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PrinterSettings.PrinterResolutionCollection))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PrinterSettings.StringCollection))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PrinterUnit))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PrinterUnitConvert))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PrintEventArgs))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PrintEventHandler))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PrintPageEventArgs))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PrintPageEventHandler))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PrintRange))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.QueryPageSettingsEventArgs))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.QueryPageSettingsEventHandler))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.StandardPrintController))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Region))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.RotateFlipType))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.SolidBrush))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.StringAlignment))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.StringDigitSubstitute))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.StringFormat))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.StringFormatFlags))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.StringTrimming))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.StringUnit))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.SystemBrushes))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.SystemColors))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.SystemFonts))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.SystemIcons))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.SystemPens))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Text.FontCollection))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Text.GenericFontFamilies))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Text.HotkeyPrefix))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Text.InstalledFontCollection))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Text.PrivateFontCollection))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Text.TextRenderingHint))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.TextureBrush))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.ToolboxBitmapAttribute))]
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,35 @@
|
||||
//
|
||||
// Copyright (c) 2018 Microsoft
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
[assembly: AssemblyTitle ("System.Memory")]
|
||||
[assembly: AssemblyDescription ("System.Memory")]
|
||||
[assembly: AssemblyDefaultAlias ("System.Memory")]
|
||||
[assembly: AssemblyCompany ("Mono development team")]
|
||||
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
|
||||
[assembly: AssemblyCopyright ("(c) Various Mono authors")]
|
||||
[assembly: AssemblyVersion ("4.0.1.0")]
|
||||
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
|
||||
[assembly: AssemblyFileVersion ("4.0.0.0")]
|
||||
@@ -0,0 +1,24 @@
|
||||
MCS_BUILD_DIR = ../../../build
|
||||
|
||||
thisdir = class/Facades/System.Memory
|
||||
SUBDIRS =
|
||||
include $(MCS_BUILD_DIR)/rules.make
|
||||
|
||||
LIBRARY_SUBDIR = Facades
|
||||
LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
|
||||
|
||||
LIBRARY = System.Memory.dll
|
||||
|
||||
KEYFILE = ../../Open.snk
|
||||
LIBRARY_SNK = $(KEYFILE)
|
||||
SIGN_FLAGS = /delaysign /nowarn:1616,1699
|
||||
LIB_REFS =
|
||||
LIB_MCS_FLAGS = $(SIGN_FLAGS)
|
||||
|
||||
PLATFORM_DEBUG_FLAGS =
|
||||
|
||||
NO_TEST = yes
|
||||
|
||||
include $(MCS_BUILD_DIR)/library.make
|
||||
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
TypeForwarders.cs
|
||||
AssemblyInfo.cs
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
//
|
||||
// Copyright (c) 2018 Microsoft
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
//
|
||||
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Memory<>))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ReadOnlyMemory<>))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ReadOnlySpan<>))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Span<>))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.OperationStatus))]
|
||||
|
||||
// TODO: we don't have these types yet
|
||||
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.MemoryExtensions))]
|
||||
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.SequencePosition))]
|
||||
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.BuffersExtensions))]
|
||||
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.IBufferWriter<>))]
|
||||
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.IMemoryOwner<>))]
|
||||
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.IPinnable))]
|
||||
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.MemoryHandle))]
|
||||
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.MemoryManager<>))]
|
||||
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.MemoryPool<>))]
|
||||
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.ReadOnlySequenceSegment<>))]
|
||||
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.ReadOnlySequence<>))]
|
||||
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.StandardFormat))]
|
||||
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.Binary.BinaryPrimitives))]
|
||||
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.Text.Base64))]
|
||||
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.Text.Utf8Formatter))]
|
||||
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.Text.Utf8Parser))]
|
||||
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.InteropServices.MemoryMarshal))]
|
||||
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.InteropServices.SequenceMarshal))]
|
||||
@@ -90,7 +90,7 @@ wasm_SUBDIRS = $(common_DEPS_SUBDIRS) $(netstandard_drawing_SUBDIRS) $(mobile_on
|
||||
wasm_PARALLEL_SUBDIRS = $(common_SUBDIRS) $(mobile_only_SUBDIRS)
|
||||
|
||||
mobile_only_SUBDIRS = System.Net.Ping System.Runtime.Serialization.Formatters System.Security.Cryptography.Csp System.Security.Cryptography.Pkcs \
|
||||
System.Security.Cryptography.Cng System.Runtime.Loader System.Xml.XPath.XmlDocument System.Reflection.DispatchProxy
|
||||
System.Security.Cryptography.Cng System.Runtime.Loader System.Xml.XPath.XmlDocument System.Reflection.DispatchProxy System.Memory System.Drawing.Common
|
||||
|
||||
mobile_only_DEPS_SUBDIRS = System.Security.Cryptography.OpenSsl
|
||||
|
||||
|
||||
@@ -373,8 +373,8 @@ namespace Mono.Profiler.Log {
|
||||
case LogEventType.MonitorBacktrace:
|
||||
ev = new MonitorEvent {
|
||||
Event = StreamHeader.FormatVersion >= 14 ?
|
||||
(LogMonitorEvent) _reader.ReadByte () :
|
||||
(LogMonitorEvent) ((((byte) type & 0xf0) >> 4) & 0x3),
|
||||
(LogMonitorEvent) _reader.ReadByte () :
|
||||
(LogMonitorEvent) ((((byte) type & 0xf0) >> 4) & 0x3),
|
||||
ObjectPointer = ReadObject (),
|
||||
Backtrace = ReadBacktrace (extType == LogEventType.MonitorBacktrace),
|
||||
};
|
||||
@@ -476,9 +476,9 @@ namespace Mono.Profiler.Log {
|
||||
Section = section,
|
||||
SectionName = section == LogCounterSection.User ? _reader.ReadCString () : null,
|
||||
CounterName = _reader.ReadCString (),
|
||||
Type = StreamHeader.FormatVersion < 15 ? (LogCounterType) _reader.ReadByte () : (LogCounterType) _reader.ReadULeb128 (),
|
||||
Unit = StreamHeader.FormatVersion < 15 ? (LogCounterUnit) _reader.ReadByte () : (LogCounterUnit) _reader.ReadULeb128 (),
|
||||
Variance = StreamHeader.FormatVersion < 15 ? (LogCounterVariance) _reader.ReadByte () : (LogCounterVariance) _reader.ReadULeb128 (),
|
||||
Type = (LogCounterType) _reader.ReadByte (),
|
||||
Unit = (LogCounterUnit) _reader.ReadByte (),
|
||||
Variance = (LogCounterVariance) _reader.ReadByte (),
|
||||
Index = (long) _reader.ReadULeb128 (),
|
||||
};
|
||||
}
|
||||
@@ -498,7 +498,7 @@ namespace Mono.Profiler.Log {
|
||||
if (index == 0)
|
||||
break;
|
||||
|
||||
var counterType = StreamHeader.FormatVersion < 15 ? (LogCounterType) _reader.ReadByte () : (LogCounterType) _reader.ReadULeb128 ();
|
||||
var counterType = (LogCounterType) _reader.ReadByte ();
|
||||
|
||||
object value = null;
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace System.Web.UI.Design
|
||||
public HtmlControlDesigner () { throw new NotImplementedException (); }
|
||||
|
||||
[MonoTODO]
|
||||
protected override void Dispose (bool disposing) { throw new NotImplementedException (); }
|
||||
protected override void Dispose (bool disposing) { }
|
||||
|
||||
[MonoTODO]
|
||||
[Obsolete ("Use ControlDesigner.Tag instead")]
|
||||
|
||||
@@ -85,7 +85,7 @@ namespace System.Net.Http
|
||||
|
||||
public WindowsProxyUsePolicy WindowsProxyUsePolicy { get { throw new PlatformNotSupportedException (); } set { throw new PlatformNotSupportedException (); } }
|
||||
|
||||
protected override void Dispose (bool disposing) { throw new PlatformNotSupportedException (); }
|
||||
protected override void Dispose (bool disposing) { }
|
||||
|
||||
protected override Task<HttpResponseMessage> SendAsync (HttpRequestMessage request, Threading.CancellationToken cancellationToken) { throw new PlatformNotSupportedException (); }
|
||||
}
|
||||
|
||||
@@ -1443,7 +1443,7 @@ namespace MonoTests.System.Net.Http
|
||||
HttpListener CreateListener (Action<HttpListenerContext> contextAssert, int port)
|
||||
{
|
||||
var l = new HttpListener ();
|
||||
l.Prefixes.Add (string.Format ("http://+:{0}/", port));
|
||||
l.Prefixes.Add (string.Format ("http://*:{0}/", port));
|
||||
l.Start ();
|
||||
AddListenerContext(l, contextAssert);
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ LIB_MCS_FLAGS = /unsafe
|
||||
TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
|
||||
XTEST_LIB_REFS = System Facades/System.Threading.Tasks Facades/System.Runtime.InteropServices.RuntimeInformation System.Core System.Numerics.Vectors Microsoft.CSharp
|
||||
XTEST_LIB_FLAGS = -unsafe
|
||||
LIBRARY_WARN_AS_ERROR = yes
|
||||
#LIBRARY_WARN_AS_ERROR = yes
|
||||
|
||||
RESX_RESOURCE_STRING = \
|
||||
../../../external/corefx/src/System.Runtime.Numerics/src/Resources/Strings.resx \
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace System.Security.Cryptography.Pkcs {
|
||||
// only accessible from SignedPkcs7.SignerInfos
|
||||
internal SignerInfo (string hashName, X509Certificate2 certificate, SubjectIdentifierType type, object o, int version)
|
||||
{
|
||||
_digest = new Oid (CryptoConfig.MapNameToOID (hashName));
|
||||
_digest = new Oid (CryptoConfig.MapNameToOID (hashName) ?? hashName);
|
||||
_certificate = certificate;
|
||||
_counter = new SignerInfoCollection ();
|
||||
_signed = new CryptographicAttributeObjectCollection ();
|
||||
|
||||
@@ -100,6 +100,26 @@ namespace MonoTests.System.Security.Cryptography.Pkcs {
|
||||
Assert.AreEqual (0, si.UnsignedAttributes.Count, "UnsignedAttributes");
|
||||
Assert.AreEqual (3, si.Version, "Version");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ExplicitCryptographicObjectIdentifier ()
|
||||
{
|
||||
var data = new byte [] {
|
||||
48, 130, 36, 126, 6, 9, 42, 134, 72, 134, 247, 13, 1, 7, 2, 160, 130, 36, 111, 48, 130, 36, 107, 2, 1, 3, 49, 15, 48, 13, 6, 9, 96, 134, 72, 1, 101, 3, 4, 2, 1, 5, 0, 48, 100, 6, 9, 42, 134, 72, 134, 247, 13, 1, 7, 1, 160, 87, 4, 85, 86, 101, 114, 115, 105, 111, 110, 58, 49, 10, 10, 50, 46, 49, 54, 46, 56, 52, 48, 46, 49, 46, 49, 48, 49, 46, 51, 46, 52, 46, 50, 46, 49, 45, 72, 97, 115, 104, 58, 109, 117, 115, 49, 107, 97, 84, 89, 76, 113, 111, 81, 110, 85, 105, 104, 103, 104, 109, 102, 48, 120, 110, 104, 43, 69, 111, 65, 85, 73, 119, 104, 122, 50, 82, 117, 57, 52, 109, 69, 54, 117, 73, 61, 10, 10, 160, 130, 14, 42, 48, 130, 3, 183, 48, 130, 2, 159, 160, 3, 2, 1, 2, 2, 16, 12, 231, 224, 229, 23, 216, 70, 254, 143, 229, 96, 252, 27, 240, 48, 57, 48, 13, 6, 9, 42, 134, 72, 134, 247, 13, 1, 1, 5, 5, 0, 48, 101, 49, 11, 48, 9, 6, 3, 85, 4, 6, 19, 2, 85, 83, 49, 21, 48, 19, 6, 3, 85, 4, 10, 19, 12, 68, 105, 103, 105, 67, 101, 114, 116, 32, 73, 110, 99, 49, 25, 48, 23, 6, 3, 85, 4, 11, 19, 16, 119, 119, 119, 46, 100, 105, 103, 105, 99, 101, 114, 116, 46, 99, 111, 109, 49, 36, 48, 34, 6, 3, 85, 4, 3, 19, 27, 68, 105, 103, 105, 67, 101, 114, 116, 32, 65, 115, 115, 117, 114, 101, 100, 32, 73, 68, 32, 82, 111, 111, 116, 32, 67, 65, 48, 30, 23, 13, 48, 54, 49, 49, 49, 48, 48, 48, 48, 48, 48, 48, 90, 23, 13, 51, 49, 49, 49, 49, 48, 48, 48, 48, 48, 48, 48, 90, 48, 101, 49, 11, 48, 9, 6, 3, 85, 4, 6, 19, 2, 85, 83, 49, 21, 48, 19, 6, 3, 85, 4, 10, 19, 12, 68, 105, 103, 105, 67, 101, 114, 116, 32, 73, 110, 99, 49, 25, 48, 23, 6, 3, 85, 4, 11, 19, 16, 119, 119, 119, 46, 100, 105, 103, 105, 99, 101, 114, 116, 46, 99, 111, 109, 49, 36, 48, 34, 6, 3, 85, 4, 3, 19, 27, 68, 105, 103, 105, 67, 101, 114, 116, 32, 65, 115, 115, 117, 114, 101, 100, 32, 73, 68, 32, 82, 111, 111, 116, 32, 67, 65, 48, 130, 1, 34, 48, 13, 6, 9, 42, 134, 72, 134, 247, 13, 1, 1, 1, 5, 0, 3, 130, 1, 15, 0, 48, 130, 1, 10, 2, 130, 1, 1, 0, 173, 14, 21, 206, 228, 67, 128, 92, 177, 135, 243, 183, 96, 249, 113, 18, 165, 174, 220, 38, 148, 136, 170, 244, 206, 245, 32, 57, 40, 88, 96, 12, 248, 128, 218, 169, 21, 149, 50, 97, 60, 181, 177, 40, 132, 138, 138, 220, 159, 10, 12, 131, 23, 122, 143, 144, 172, 138, 231, 121, 83, 92, 49, 132, 42, 246, 15, 152, 50, 54, 118, 204, 222, 221, 60, 168, 162, 239, 106, 251, 33, 242, 82, 97, 223, 159, 32, 215, 31, 226, 177, 217, 254, 24, 100, 210, 18, 91, 95, 249, 88, 24, 53, 188, 71, 205, 161, 54, 249, 107, 127, 212, 176, 56, 62, 193, 27, 195, 140, 51, 217, 216, 47, 24, 254, 40, 15, 179, 167, 131, 214, 195, 110, 68, 192, 97, 53, 150, 22, 254, 89, 156, 139, 118, 109, 215, 241, 162, 75, 13, 43, 255, 11, 114, 218, 158, 96, 208, 142, 144, 53, 198, 120, 85, 135, 32, 161, 207, 229, 109, 10, 200, 73, 124, 49, 152, 51, 108, 34, 233, 135, 208, 50, 90, 162, 186, 19, 130, 17, 237, 57, 23, 157, 153, 58, 114, 161, 230, 250, 164, 217, 213, 23, 49, 117, 174, 133, 125, 34, 174, 63, 1, 70, 134, 246, 40, 121, 200, 177, 218, 228, 87, 23, 196, 126, 28, 14, 176, 180, 146, 166, 86, 179, 189, 178, 151, 237, 170, 167, 240, 183, 197, 168, 63, 149, 22, 208, 255, 161, 150, 235, 8, 95, 24, 119, 79, 2, 3, 1, 0, 1, 163, 99, 48, 97, 48, 14, 6, 3, 85, 29, 15, 1, 1, 255, 4, 4, 3, 2, 1, 134, 48, 15, 6, 3, 85, 29, 19, 1, 1, 255, 4, 5, 48, 3, 1, 1, 255, 48, 29, 6, 3, 85, 29, 14, 4, 22, 4, 20, 69, 235, 162, 175, 244, 146, 203, 130, 49, 45, 81, 139, 167, 167, 33, 157, 243, 109, 200, 15, 48, 31, 6, 3, 85, 29, 35, 4, 24, 48, 22, 128, 20, 69, 235, 162, 175, 244, 146, 203, 130, 49, 45, 81, 139, 167, 167, 33, 157, 243, 109, 200, 15, 48, 13, 6, 9, 42, 134, 72, 134, 247, 13, 1, 1, 5, 5, 0, 3, 130, 1, 1, 0, 162, 14, 188, 223, 226, 237, 240, 227, 114, 115, 122, 100, 148, 191, 247, 114, 102, 216, 50, 228, 66, 117, 98, 174, 135, 235, 242, 213, 217, 222, 86, 179, 159, 204, 206, 20, 40, 185, 13, 151, 96, 92, 18, 76, 88, 228, 211, 61, 131, 73, 69, 88, 151, 53, 105, 26, 168, 71, 234, 86, 198, 121, 171, 18, 216, 103, 129, 132, 223, 127, 9, 60, 148, 230, 184, 38, 44, 32, 189, 61, 179, 40, 137, 247, 95, 255, 34, 226, 151, 132, 31, 233, 101, 239, 135, 224, 223, 193, 103, 73, 179, 93, 235, 178, 9, 42, 235, 38, 237, 120, 190, 125, 63, 43, 243, 183, 38, 53, 109, 95, 137, 1, 182, 73, 91, 159, 1, 5, 155, 171, 61, 37, 193, 204, 182, 127, 194, 241, 111, 134, 198, 250, 100, 104, 235, 129, 45, 148, 235, 66, 183, 250, 140, 30, 221, 98, 241, 190, 80, 103, 183, 108, 189, 243, 241, 31, 107, 12, 54, 7, 22, 127, 55, 124, 169, 91, 109, 122, 241, 18, 70, 96, 131, 215, 39, 4, 190, 75, 206, 151, 190, 195, 103, 42, 104, 17, 223, 128, 231, 12, 51, 102, 191, 19, 13, 20, 110, 243, 127, 31, 99, 16, 30, 250, 141, 27, 37, 109, 108, 143, 165, 183, 97, 1, 177, 210, 163, 38, 161, 16, 113, 157, 173, 226, 195, 249, 195, 153, 81, 183, 43, 7, 8, 206, 46, 230, 80, 178, 167, 250, 10, 69, 47, 162, 240, 242, 48, 130, 5, 48, 48, 130, 4, 24, 160, 3, 2, 1, 2, 2, 16, 4, 9, 24, 27, 95, 213, 187, 102, 117, 83, 67, 181, 111, 149, 80, 8, 48, 13, 6, 9, 42, 134, 72, 134, 247, 13, 1, 1, 11, 5, 0, 48, 101, 49, 11, 48, 9, 6, 3,Line truncated
|
||||
};
|
||||
|
||||
SignerInfo si = GetSignerInfo (data);
|
||||
// default properties
|
||||
Assert.AreEqual (0, si.SignedAttributes.Count, "SignedAttributes");
|
||||
Assert.IsNotNull (si.Certificate, "Certificate");
|
||||
Assert.AreEqual (0, si.CounterSignerInfos.Count, "CounterSignerInfos");
|
||||
Assert.AreEqual ("sha256", si.DigestAlgorithm.FriendlyName, "DigestAlgorithm.FriendlyName");
|
||||
Assert.AreEqual ("2.16.840.1.101.3.4.2.1", si.DigestAlgorithm.Value, "DigestAlgorithm.Value");
|
||||
Assert.AreEqual (SubjectIdentifierType.SubjectKeyIdentifier, si.SignerIdentifier.Type, "SignerIdentifier.Type");
|
||||
Assert.AreEqual ("F1CC7184EBDA537140C1A57416017810DF133020", (string)si.SignerIdentifier.Value, "SignerIdentifier.Value");
|
||||
Assert.AreEqual (0, si.UnsignedAttributes.Count, "UnsignedAttributes");
|
||||
Assert.AreEqual (3, si.Version, "Version");
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -9,6 +9,7 @@ ReferenceSources/ThisAssembly.cs
|
||||
ReferenceSources/TypeScope.cs
|
||||
ReferenceSources/Wsdl.cs
|
||||
ReferenceSources/CodeDom.cs
|
||||
ReferenceSources/BinaryCompatibility.cs
|
||||
../referencesource/System.Data.SqlXml/System/Xml/Xsl/ISourceLineInfo.cs
|
||||
../referencesource/System.Data.SqlXml/System/Xml/Xsl/ListBase.cs
|
||||
../referencesource/System.Data.SqlXml/System/Xml/Xsl/Pair.cs
|
||||
@@ -138,7 +139,6 @@ ReferenceSources/CodeDom.cs
|
||||
../referencesource/System.Xml/System/Xml/Cache/XPathNodeInfoAtom.cs
|
||||
../referencesource/System.Xml/System/Xml/Cache/XPathNodeView.cs
|
||||
../referencesource/System.Xml/System/Xml/Cache/XPathNodeViewPropertyDescriptor.cs
|
||||
../referencesource/System.Xml/System/Xml/Core/BinaryCompatibility.cs
|
||||
../referencesource/System.Xml/System/Xml/Core/CharEntityEncoderFallback.cs
|
||||
../referencesource/System.Xml/System/Xml/Core/ConformanceLevel.cs
|
||||
../referencesource/System.Xml/System/Xml/Core/DtdProcessing.cs
|
||||
|
||||
@@ -59,6 +59,6 @@ namespace System.IO
|
||||
protected void OnRenamed (RenamedEventArgs e) { throw new NotImplementedException (); }
|
||||
public WaitForChangedResult WaitForChanged (WatcherChangeTypes changeType) { throw new NotImplementedException (); }
|
||||
public WaitForChangedResult WaitForChanged (WatcherChangeTypes changeType, int timeout) { throw new NotImplementedException (); }
|
||||
protected override void Dispose (bool disposing) { throw new NotImplementedException (); }
|
||||
protected override void Dispose (bool disposing) { }
|
||||
}
|
||||
}
|
||||
@@ -320,11 +320,9 @@ namespace System.Net {
|
||||
try {
|
||||
IPAddress newAddress = IPAddress.Parse(h_addrlist[i]);
|
||||
|
||||
#pragma warning disable 618
|
||||
if( (Socket.SupportsIPv6 && newAddress.AddressFamily == AddressFamily.InterNetworkV6) ||
|
||||
(Socket.SupportsIPv4 && newAddress.AddressFamily == AddressFamily.InterNetwork) )
|
||||
if( (Socket.OSSupportsIPv6 && newAddress.AddressFamily == AddressFamily.InterNetworkV6) ||
|
||||
(Socket.OSSupportsIPv4 && newAddress.AddressFamily == AddressFamily.InterNetwork) )
|
||||
addrlist.Add(newAddress);
|
||||
#pragma warning restore 618
|
||||
} catch (ArgumentNullException) {
|
||||
/* Ignore this, as the
|
||||
* internal call might have
|
||||
|
||||
@@ -163,6 +163,7 @@ namespace MonoTests.System.Net.Sockets
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
[Ignore ("https://github.com/mono/mono/issues/6513")] // frequently fails on ARM
|
||||
public void AcceptBlockingStatus()
|
||||
{
|
||||
bool block;
|
||||
|
||||
@@ -209,6 +209,13 @@ namespace MonoTests.System.Net
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category("NotOnWindows")]
|
||||
public void GetHostAddresses_IPv6 ()
|
||||
{
|
||||
var address = Dns.GetHostAddresses("ipv6.google.com");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void GetHostName ()
|
||||
{
|
||||
|
||||
@@ -293,9 +293,6 @@ namespace MonoTests.System.Net
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
#if MONOTOUCH
|
||||
[Ignore ("On device sometimes hangs in the call to listener.GetContext (). See bug #60542.")]
|
||||
#endif
|
||||
public void HttpRequestIgnoreBadCookies ()
|
||||
{
|
||||
|
||||
@@ -241,9 +241,6 @@ public class IPAddressTest
|
||||
[Test]
|
||||
public void IsLoopbackV6 ()
|
||||
{
|
||||
// if (!Socket.SupportsIPv6)
|
||||
// Assert.Ignore ("IPv6 must be enabled in machine.config");
|
||||
|
||||
IPAddress ip = IPAddress.IPv6Loopback;
|
||||
Assert.IsTrue (IPAddress.IsLoopback (ip), "#1");
|
||||
|
||||
@@ -612,9 +609,6 @@ public class IPAddressTest
|
||||
[Test]
|
||||
public void ParseWrongV6 ()
|
||||
{
|
||||
//if (!Socket.SupportsIPv6)
|
||||
// Assert.Ignore ("IPv6 must be enabled in machine.config");
|
||||
|
||||
for (int i = 0; i < ipv6ParseWrong.Length; i++) {
|
||||
string ipAddress = ipv6ParseWrong [i];
|
||||
|
||||
|
||||
@@ -1691,10 +1691,11 @@ namespace MonoTests.System.Net
|
||||
// We throw a PlatformNotSupportedException deeper, which is caught and re-thrown as WebException
|
||||
[ExpectedException (typeof (WebException))]
|
||||
#endif
|
||||
[Category ("InetAccess")]
|
||||
public void GetWebRequestOverriding ()
|
||||
{
|
||||
GetWebRequestOverridingTestClass testObject = new GetWebRequestOverridingTestClass ();
|
||||
testObject.DownloadData ("http://www.mono-project.com");
|
||||
testObject.DownloadData ("http://www.example.com");
|
||||
|
||||
Assert.IsTrue (testObject.overridedCodeRan, "Overrided code wasn't called");
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ namespace MonoTests.System.Net
|
||||
WebClient wc = new WebClient ();
|
||||
string filename = Path.GetTempFileName ();
|
||||
|
||||
var task = wc.DownloadFileTaskAsync ("http://www.mono-project.com/", filename);
|
||||
var task = wc.DownloadFileTaskAsync ("http://www.example.com/", filename);
|
||||
Assert.IsTrue (task.Wait (15000));
|
||||
Assert.IsTrue (task.IsCompleted);
|
||||
|
||||
|
||||
@@ -75,6 +75,7 @@ using System.Runtime.InteropServices;
|
||||
|
||||
[assembly: InternalsVisibleTo ("System, PublicKey=" + AssemblyRef.FrameworkPublicKeyFull2)]
|
||||
[assembly: InternalsVisibleTo ("System.Core, PublicKey=" + AssemblyRef.FrameworkPublicKeyFull2)]
|
||||
[assembly: InternalsVisibleTo ("System.Numerics, PublicKey=00000000000000000400000000000000")]
|
||||
|
||||
[assembly: InternalsVisibleTo ("System.Runtime.WindowsRuntime, PublicKey=00000000000000000400000000000000")]
|
||||
[assembly: InternalsVisibleTo ("System.Runtime.WindowsRuntime.UI.Xaml, PublicKey=00000000000000000400000000000000")]
|
||||
|
||||
@@ -6,7 +6,7 @@ export __SECURITY_BOOTSTRAP_DB=$(topdir)/class/corlib
|
||||
LIBRARY = corlib.dll
|
||||
LIBRARY_NAME = mscorlib.dll
|
||||
|
||||
LIB_MCS_FLAGS = $(REFERENCE_SOURCES_FLAGS) $(RESOURCE_FILES:%=-resource:%)
|
||||
LIB_MCS_FLAGS = $(REFERENCE_SOURCES_FLAGS) $(RESOURCE_FILES:%=-resource:%) -nowarn:3019
|
||||
|
||||
LIBRARY_WARN_AS_ERROR = yes
|
||||
#LIBRARY_USE_INTERMEDIATE_FILE = yes
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Mono {
|
||||
|
||||
@@ -79,5 +80,29 @@ namespace Mono {
|
||||
// No longer used
|
||||
return true;
|
||||
}
|
||||
|
||||
#if !MOBILE
|
||||
[MethodImplAttribute (MethodImplOptions.InternalCall)]
|
||||
static extern void DisableMicrosoftTelemetry (IntPtr appBundleID, IntPtr appSignature, IntPtr appVersion, IntPtr merpGUIPath);
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.InternalCall)]
|
||||
static extern void EnableMicrosoftTelemetry_internal (IntPtr appBundleID, IntPtr appSignature, IntPtr appVersion, IntPtr merpGUIPath);
|
||||
|
||||
static void EnableMicrosoftTelemetry (string appBundleID_str, string appSignature_str, string appVersion_str, string merpGUIPath_str)
|
||||
{
|
||||
if (RuntimeInformation.IsOSPlatform (OSPlatform.OSX)) {
|
||||
using (var appBundleID_chars = RuntimeMarshal.MarshalString (appBundleID_str))
|
||||
using (var appSignature_chars = RuntimeMarshal.MarshalString (appSignature_str))
|
||||
using (var appVersion_chars = RuntimeMarshal.MarshalString (appVersion_str))
|
||||
using (var merpGUIPath_chars = RuntimeMarshal.MarshalString (merpGUIPath_str))
|
||||
{
|
||||
EnableMicrosoftTelemetry_internal (appBundleID_chars.Value, appSignature_chars.Value, appVersion_chars.Value, merpGUIPath_chars.Value);
|
||||
}
|
||||
} else {
|
||||
throw new PlatformNotSupportedException("Merp support is currently only supported on OSX.");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
}
|
||||
@@ -32,7 +32,8 @@ using System.IO;
|
||||
using System.Text;
|
||||
namespace System {
|
||||
// This class reads data from a byte array or file containing the terminfo capabilities
|
||||
// information for any given terminal. The maximum allowed size is 4096 bytes.
|
||||
// information for any given terminal. The maximum allowed size is 4096 (or
|
||||
// 32768 for terminfo2) bytes.
|
||||
//
|
||||
// Terminfo database files are divided in the following sections:
|
||||
//
|
||||
@@ -45,7 +46,7 @@ namespace System {
|
||||
//
|
||||
// The header is as follows:
|
||||
//
|
||||
// Magic number (0x1 and 0x1A)
|
||||
// Magic number (0x11A/0432 or 0x21e/01036 for terminfo2)
|
||||
// Terminal names size
|
||||
// Boolean section size
|
||||
// Numeric section size
|
||||
@@ -58,8 +59,9 @@ namespace System {
|
||||
// The boolean capabilities section has bytes that are set to 1 if the capability is supported
|
||||
// and 0 otherwise. If the index of a capability is greater than the section size, 0 is assumed.
|
||||
//
|
||||
// The numeric capabilities section holds 2-byte integers in little endian format. No negative
|
||||
// values are allowed and the absence of a capability is marked as two 0xFF.
|
||||
// The numeric capabilities section holds 2-byte integers (4-byte integers for terminfo2) in
|
||||
// little endian format. No negative values are allowed and the absence of a capability is marked
|
||||
// as two 0xFF (four 0xFF for terminfo2).
|
||||
//
|
||||
// The string offsets section contains 2-byte integer offsets into the string capabilies section.
|
||||
// If the capability is not supported, the index will be two 0xFF bytes.
|
||||
@@ -72,17 +74,17 @@ namespace System {
|
||||
//
|
||||
|
||||
class TermInfoReader {
|
||||
//short nameSize;
|
||||
short boolSize;
|
||||
short numSize;
|
||||
short strOffsets;
|
||||
//short strSize;
|
||||
int boolSize;
|
||||
int numSize;
|
||||
int strOffsets;
|
||||
|
||||
//string [] names; // Last one is the description
|
||||
byte [] buffer;
|
||||
int booleansOffset;
|
||||
//string term;
|
||||
|
||||
int intOffset;
|
||||
|
||||
public TermInfoReader (string term, string filename)
|
||||
{
|
||||
using (FileStream st = File.OpenRead (filename)) {
|
||||
@@ -114,12 +116,21 @@ namespace System {
|
||||
// get { return term; }
|
||||
// }
|
||||
|
||||
void DetermineVersion (short magic)
|
||||
{
|
||||
if (magic == 0x11a)
|
||||
intOffset = 2;
|
||||
else if (magic == 0x21e)
|
||||
intOffset = 4;
|
||||
else
|
||||
throw new Exception (String.Format ("Magic number is unexpected: {0}", magic));
|
||||
}
|
||||
|
||||
void ReadHeader (byte [] buffer, ref int position)
|
||||
{
|
||||
short magic = GetInt16 (buffer, position);
|
||||
position += 2;
|
||||
if (magic != 282)
|
||||
throw new Exception (String.Format ("Magic number is wrong: {0}", magic));
|
||||
DetermineVersion (magic);
|
||||
|
||||
/*nameSize =*/ GetInt16 (buffer, position);
|
||||
position += 2;
|
||||
@@ -161,8 +172,8 @@ namespace System {
|
||||
if ((offset % 2) == 1)
|
||||
offset++;
|
||||
|
||||
offset += ((int) number) * 2;
|
||||
return GetInt16 (buffer, offset);
|
||||
offset += ((int) number) * intOffset;
|
||||
return GetInteger (buffer, offset);
|
||||
}
|
||||
|
||||
public string Get (TermInfoStrings tstr)
|
||||
@@ -175,7 +186,7 @@ namespace System {
|
||||
if ((offset % 2) == 1)
|
||||
offset++;
|
||||
|
||||
offset += numSize * 2;
|
||||
offset += numSize * intOffset;
|
||||
int off2 = GetInt16 (buffer, offset + (int) tstr * 2);
|
||||
if (off2 == -1)
|
||||
return null;
|
||||
@@ -193,7 +204,7 @@ namespace System {
|
||||
if ((offset % 2) == 1)
|
||||
offset++;
|
||||
|
||||
offset += numSize * 2;
|
||||
offset += numSize * intOffset;
|
||||
int off2 = GetInt16 (buffer, offset + (int) tstr * 2);
|
||||
if (off2 == -1)
|
||||
return null;
|
||||
@@ -211,6 +222,27 @@ namespace System {
|
||||
return (short) (uno + dos * 256);
|
||||
}
|
||||
|
||||
int GetInt32 (byte [] buffer, int offset)
|
||||
{
|
||||
int b1 = (int) buffer [offset];
|
||||
int b2 = (int) buffer [offset + 1];
|
||||
int b3 = (int) buffer [offset + 2];
|
||||
int b4 = (int) buffer [offset + 3];
|
||||
if (b1 == 255 && b2 == 255 && b3 == 255 && b4 == 255)
|
||||
return -1;
|
||||
|
||||
return b1 + b2 << 8 + b3 << 16 + b4 << 24;
|
||||
}
|
||||
|
||||
int GetInteger (byte [] buffer, int offset)
|
||||
{
|
||||
if (intOffset == 2)
|
||||
return GetInt16 (buffer, offset);
|
||||
else
|
||||
// intOffset == 4
|
||||
return GetInt32 (buffer, offset);
|
||||
}
|
||||
|
||||
string GetString (byte [] buffer, int offset)
|
||||
{
|
||||
int length = 0;
|
||||
|
||||
@@ -186,6 +186,10 @@ public class TimeZoneTest {
|
||||
TST (t1);
|
||||
break;
|
||||
case "GMT":
|
||||
#if MONOTOUCH
|
||||
if (string.IsNullOrEmpty (t1.DaylightName))
|
||||
Assert.Ignore ("This test may fail due to: http://www.openradar.me/38174449");
|
||||
#endif
|
||||
GMT (t1);
|
||||
break;
|
||||
case "NZST":
|
||||
|
||||
@@ -3742,6 +3742,48 @@ namespace MonoTests.System
|
||||
{
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void IsAssignableFromArraySpecialInterfaceGtd ()
|
||||
{
|
||||
// Regression test for https://github.com/mono/mono/issues/7095
|
||||
// An "array special interface" is a Mono name for some
|
||||
// interfaces that are implemented by arrays.
|
||||
// Check that an array special interface GTD (ie, IList<> not IList<Foo>) work
|
||||
// correctly with IsAssignableFrom.
|
||||
var il = typeof (IList<>);
|
||||
var ie = typeof (IEnumerable<>);
|
||||
var ilparam = il.GetTypeInfo ().GenericTypeParameters [0];
|
||||
var ilparr = ilparam.MakeArrayType ();
|
||||
|
||||
Assert.IsTrue (ie.IsAssignableFrom (ie), "IList<> ---> IEnumerable<>");
|
||||
Assert.IsTrue (il.IsAssignableFrom (ilparr), "!0[] ---> IList<>");
|
||||
|
||||
var ilparrarr = ilparr.MakeArrayType ();
|
||||
|
||||
Assert.IsFalse (il.IsAssignableFrom (ilparrarr), "!0[][] -!-> IList<>");
|
||||
|
||||
Assert.IsFalse (il.IsAssignableFrom (typeof (Array)), "System.Array -!-> IList<>");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void IsAssignableFromArrayEnumerator ()
|
||||
{
|
||||
// Regression test for https://github.com/mono/mono/issues/7093
|
||||
// An array does not implement IEnumerator`1
|
||||
|
||||
var arrStr = typeof (string[]);
|
||||
var ieStr = typeof (IEnumerator<string>);
|
||||
var ieEqStr = typeof (IEnumerator<IEquatable<string>>);
|
||||
Assert.IsFalse (ieStr.IsAssignableFrom (arrStr), "string[] -!-> IEnumerator<string>");
|
||||
Assert.IsFalse (ieEqStr.IsAssignableFrom (arrStr), "string[] -!-> IEnumerator<IEquatable<string>>");
|
||||
|
||||
var arrInt = typeof (int[]);
|
||||
var ieInt = typeof (IEnumerator<int>);
|
||||
var ieEqInt = typeof (IEnumerator<IEquatable<int>>);
|
||||
Assert.IsFalse (ieInt.IsAssignableFrom (arrInt), "int[] -!-> IEnumerator<int>");
|
||||
Assert.IsFalse (ieEqInt.IsAssignableFrom (arrInt), "int[] -!-> IEnumerator<IEquatable<int>>");
|
||||
}
|
||||
|
||||
[Test] // Bug #612780
|
||||
public void CannotMakeDerivedTypesFromTypedByRef ()
|
||||
{
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace System.IO
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public virtual Task WriteAsync (ReadOnlyMemory<byte> source, CancellationToken cancellationToken = default(CancellationToken))
|
||||
internal virtual Task WriteAsync (ReadOnlyMemory<byte> source, CancellationToken cancellationToken = default(CancellationToken))
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
@@ -174,9 +174,9 @@
|
||||
# System.Text.RegularExpressions
|
||||
../../../external/corefx/src/System.Text.RegularExpressions/tests/*.cs:CaptureCollectionTests.netcoreapp.cs,GroupCollectionTests.netcoreapp.cs,MatchCollectionTests.netcoreapp.cs,PrecompiledRegexScenarioTest.cs,RegexCompilationInfoTests.cs,RegexGroupNameTests.cs,Regex.Groups.Tests.cs,Regex.Match.Tests.cs,Regex.Serialization.cs,MatchCollectionTests.cs,Regex.Ctor.Tests.cs,GroupCollectionTests2.cs,MatchCollectionTests2.cs,CaptureCollectionTests2.cs
|
||||
|
||||
../../../external/corefx/src/System.Memory/tests/*.cs
|
||||
../../../external/corefx/src/System.Memory/tests/Binary/*.cs
|
||||
../../../external/corefx/src/System.Memory/tests/Memory/*.cs
|
||||
../../../external/corefx/src/System.Memory/tests/ReadOnlyMemory/*.cs
|
||||
../../../external/corefx/src/System.Memory/tests/ReadOnlySpan/*.cs
|
||||
../../../external/corefx/src/System.Memory/tests/Span/*.cs
|
||||
#../../../external/corefx/src/System.Memory/tests/*.cs
|
||||
#../../../external/corefx/src/System.Memory/tests/Binary/*.cs
|
||||
#../../../external/corefx/src/System.Memory/tests/Memory/*.cs
|
||||
#../../../external/corefx/src/System.Memory/tests/ReadOnlyMemory/*.cs
|
||||
#../../../external/corefx/src/System.Memory/tests/ReadOnlySpan/*.cs
|
||||
#../../../external/corefx/src/System.Memory/tests/Span/*.cs
|
||||
@@ -44,12 +44,14 @@ NINJA_VERBOSE=$(if ($V),-v,)
|
||||
if NINJA
|
||||
NINJA_ARGS = -G Ninja
|
||||
BUILDFILE = build.ninja
|
||||
CMAKE_MAKE_PROGRAM = $(shell which ninja-build || which ninja)
|
||||
else
|
||||
NINJA_ARGS =
|
||||
BUILDFILE = Makefile
|
||||
CMAKE_MAKE_PROGRAM = $(shell which gmake || which gnumake || which make)
|
||||
endif
|
||||
|
||||
CMAKE_ARGS = -D CMAKE_INSTALL_PREFIX:PATH=$(prefix) -D BTLS_ROOT:PATH=$(BTLS_ROOT) \
|
||||
CMAKE_ARGS = -D CMAKE_MAKE_PROGRAM=$(CMAKE_MAKE_PROGRAM) -D CMAKE_INSTALL_PREFIX:PATH=$(prefix) -D BTLS_ROOT:PATH=$(BTLS_ROOT) \
|
||||
-D SRC_DIR:PATH=$(abs_top_srcdir)/mono/btls -D BTLS_CFLAGS:STRING="$(BTLS_CFLAGS)" $(NINJA_ARGS)
|
||||
|
||||
all-local: build-shared/libmono-btls-shared$(libsuffix)
|
||||
|
||||
+50
-17
@@ -1491,29 +1491,66 @@ mono_make_shadow_copy (const char *filename, MonoError *error)
|
||||
return (char *) filename;
|
||||
}
|
||||
#else
|
||||
|
||||
typedef enum {
|
||||
SHADOW_COPY_SIBLING_EXT_APPEND,
|
||||
SHADOW_COPY_SIBLING_EXT_REPLACE,
|
||||
} ShadowCopySiblingExt;
|
||||
|
||||
static
|
||||
gchar *
|
||||
make_sibling_path (const gchar *path, gint pathlen, const char *extension, ShadowCopySiblingExt extopt)
|
||||
{
|
||||
gchar *result = NULL;
|
||||
switch (extopt) {
|
||||
case SHADOW_COPY_SIBLING_EXT_APPEND: {
|
||||
result = g_strconcat (path, extension, NULL);
|
||||
break;
|
||||
}
|
||||
case SHADOW_COPY_SIBLING_EXT_REPLACE: {
|
||||
/* expect path to be a .dll or .exe (or some case insensitive variant) */
|
||||
g_assert (pathlen >= 4 && path[pathlen - 4] == '.');
|
||||
GString *s = g_string_sized_new (pathlen - 4 + strlen (extension));
|
||||
g_string_append_len (s, path, pathlen - 4);
|
||||
g_string_append (s, extension);
|
||||
result = g_string_free (s, FALSE);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
shadow_copy_sibling (gchar *src, gint srclen, const char *extension, gchar *target, gint targetlen, gint tail_len)
|
||||
shadow_copy_sibling (const gchar *src_pristine, gint srclen, const char *extension, ShadowCopySiblingExt extopt, const gchar *target_pristine, gint targetlen)
|
||||
{
|
||||
guint16 *orig, *dest;
|
||||
gboolean copy_result;
|
||||
gint32 copy_error;
|
||||
gchar *src = NULL;
|
||||
gchar *target = NULL;
|
||||
|
||||
strcpy (src + srclen - tail_len, extension);
|
||||
src = make_sibling_path (src_pristine, srclen, extension, extopt);
|
||||
|
||||
if (IS_PORTABILITY_CASE) {
|
||||
gchar *file = mono_portability_find_file (src, TRUE);
|
||||
|
||||
if (file == NULL)
|
||||
if (file == NULL) {
|
||||
g_free (src);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
g_free (file);
|
||||
} else if (!g_file_test (src, G_FILE_TEST_IS_REGULAR)) {
|
||||
g_free (src);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
orig = g_utf8_to_utf16 (src, strlen (src), NULL, NULL, NULL);
|
||||
|
||||
strcpy (target + targetlen - tail_len, extension);
|
||||
target = make_sibling_path (target_pristine, targetlen, extension, extopt);
|
||||
|
||||
dest = g_utf8_to_utf16 (target, strlen (target), NULL, NULL, NULL);
|
||||
|
||||
mono_w32file_delete (dest);
|
||||
@@ -1528,6 +1565,8 @@ shadow_copy_sibling (gchar *src, gint srclen, const char *extension, gchar *targ
|
||||
g_free (orig);
|
||||
g_free (dest);
|
||||
|
||||
g_free (src);
|
||||
g_free (target);
|
||||
return copy_result;
|
||||
}
|
||||
|
||||
@@ -1778,8 +1817,7 @@ char *
|
||||
mono_make_shadow_copy (const char *filename, MonoError *oerror)
|
||||
{
|
||||
MonoError error;
|
||||
gchar *sibling_source, *sibling_target;
|
||||
gint sibling_source_len, sibling_target_len;
|
||||
gint filename_len, shadow_len;
|
||||
guint16 *orig, *dest;
|
||||
guint32 attrs;
|
||||
char *shadow;
|
||||
@@ -1867,20 +1905,15 @@ mono_make_shadow_copy (const char *filename, MonoError *oerror)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* attempt to copy .mdb, .config if they exist */
|
||||
sibling_source = g_strconcat (filename, ".config", NULL);
|
||||
sibling_source_len = strlen (sibling_source);
|
||||
sibling_target = g_strconcat (shadow, ".config", NULL);
|
||||
sibling_target_len = strlen (sibling_target);
|
||||
/* attempt to copy .mdb, .pdb and .config if they exist */
|
||||
filename_len = strlen (filename);
|
||||
shadow_len = strlen (shadow);
|
||||
|
||||
copy_result = shadow_copy_sibling (sibling_source, sibling_source_len, ".mdb", sibling_target, sibling_target_len, 7);
|
||||
copy_result = shadow_copy_sibling (filename, filename_len, ".mdb", SHADOW_COPY_SIBLING_EXT_APPEND, shadow, shadow_len);
|
||||
if (copy_result)
|
||||
copy_result = shadow_copy_sibling (sibling_source, sibling_source_len, ".pdb", sibling_target, sibling_target_len, 11);
|
||||
copy_result = shadow_copy_sibling (filename, filename_len, ".pdb", SHADOW_COPY_SIBLING_EXT_REPLACE, shadow, shadow_len);
|
||||
if (copy_result)
|
||||
copy_result = shadow_copy_sibling (sibling_source, sibling_source_len, ".config", sibling_target, sibling_target_len, 7);
|
||||
|
||||
g_free (sibling_source);
|
||||
g_free (sibling_target);
|
||||
copy_result = shadow_copy_sibling (filename, filename_len, ".config", SHADOW_COPY_SIBLING_EXT_APPEND, shadow, shadow_len);
|
||||
|
||||
if (!copy_result) {
|
||||
g_free (shadow);
|
||||
|
||||
@@ -1116,6 +1116,7 @@ typedef struct {
|
||||
MonoClass *customattribute_data_class;
|
||||
MonoClass *critical_finalizer_object; /* MAYBE NULL */
|
||||
MonoClass *generic_ireadonlylist_class;
|
||||
MonoClass *generic_ienumerator_class;
|
||||
MonoClass *threadpool_wait_callback_class;
|
||||
MonoMethod *threadpool_perform_wait_callback_method;
|
||||
} MonoDefaults;
|
||||
|
||||
+22
-6
@@ -8403,6 +8403,24 @@ mono_class_is_assignable_from (MonoClass *klass, MonoClass *oklass)
|
||||
return TRUE;
|
||||
|
||||
if (klass->is_array_special_interface && oklass->rank == 1) {
|
||||
if (mono_class_is_gtd (klass)) {
|
||||
/* klass is an array special gtd like
|
||||
* IList`1<>, and oklass is X[] for some X.
|
||||
* Moreover we know that X isn't !0 (the gparam
|
||||
* of IList`1) because in that case we would
|
||||
* have returned TRUE for
|
||||
* MONO_CLASS_IMPLEMENTS_INTERFACE, above.
|
||||
*/
|
||||
return FALSE;
|
||||
}
|
||||
// FIXME: IEnumerator`1 should not be an array special interface.
|
||||
// The correct fix is to make
|
||||
// ((IEnumerable<U>) (new T[] {...})).GetEnumerator()
|
||||
// return an IEnumerator<U> (like .NET does) instead of IEnumerator<T>
|
||||
// and to stop marking IEnumerable`1 as an array_special_interface.
|
||||
if (mono_class_get_generic_type_definition (klass) == mono_defaults.generic_ienumerator_class)
|
||||
return FALSE;
|
||||
|
||||
//XXX we could offset this by having the cast target computed at JIT time
|
||||
//XXX we could go even further and emit a wrapper that would do the extra type check
|
||||
MonoClass *iface_klass = mono_class_from_mono_type (mono_class_get_generic_class (klass)->context.class_inst->type_argv [0]);
|
||||
@@ -10311,13 +10329,11 @@ can_access_type (MonoClass *access_klass, MonoClass *member_klass)
|
||||
if (is_nesting_type (access_klass, member_klass) || (access_klass->nested_in && is_nesting_type (access_klass->nested_in, member_klass)))
|
||||
return TRUE;
|
||||
|
||||
if (member_klass->nested_in && !can_access_type (access_klass, member_klass->nested_in))
|
||||
return FALSE;
|
||||
|
||||
/*Non nested type with nested visibility. We just fail it.*/
|
||||
if (access_level >= TYPE_ATTRIBUTE_NESTED_PRIVATE && access_level <= TYPE_ATTRIBUTE_NESTED_FAM_OR_ASSEM && member_klass->nested_in == NULL)
|
||||
return FALSE;
|
||||
|
||||
MonoClass *member_klass_nested_in = member_klass->nested_in;
|
||||
switch (access_level) {
|
||||
case TYPE_ATTRIBUTE_NOT_PUBLIC:
|
||||
return can_access_internals (access_klass->image->assembly, member_klass->image->assembly);
|
||||
@@ -10326,16 +10342,16 @@ can_access_type (MonoClass *access_klass, MonoClass *member_klass)
|
||||
return TRUE;
|
||||
|
||||
case TYPE_ATTRIBUTE_NESTED_PUBLIC:
|
||||
return TRUE;
|
||||
return member_klass_nested_in && can_access_type (access_klass, member_klass_nested_in);
|
||||
|
||||
case TYPE_ATTRIBUTE_NESTED_PRIVATE:
|
||||
return is_nesting_type (member_klass, access_klass);
|
||||
return is_nesting_type (member_klass, access_klass) && member_klass_nested_in && can_access_type (access_klass, member_klass_nested_in);
|
||||
|
||||
case TYPE_ATTRIBUTE_NESTED_FAMILY:
|
||||
return mono_class_has_parent_and_ignore_generics (access_klass, member_klass->nested_in);
|
||||
|
||||
case TYPE_ATTRIBUTE_NESTED_ASSEMBLY:
|
||||
return can_access_internals (access_klass->image->assembly, member_klass->image->assembly);
|
||||
return can_access_internals (access_klass->image->assembly, member_klass->image->assembly) && member_klass_nested_in && can_access_type (access_klass, member_klass_nested_in);
|
||||
|
||||
case TYPE_ATTRIBUTE_NESTED_FAM_AND_ASSEM:
|
||||
return can_access_internals (access_klass->image->assembly, member_klass->nested_in->image->assembly) &&
|
||||
|
||||
@@ -753,6 +753,8 @@ mono_init_internal (const char *filename, const char *exe_filename, const char *
|
||||
mono_defaults.corlib, "System.Collections.Generic", "IList`1");
|
||||
mono_defaults.generic_ireadonlylist_class = mono_class_load_from_name (
|
||||
mono_defaults.corlib, "System.Collections.Generic", "IReadOnlyList`1");
|
||||
mono_defaults.generic_ienumerator_class = mono_class_load_from_name (
|
||||
mono_defaults.corlib, "System.Collections.Generic", "IEnumerator`1");
|
||||
|
||||
mono_defaults.threadpool_wait_callback_class = mono_class_load_from_name (
|
||||
mono_defaults.corlib, "System.Threading", "_ThreadPoolWaitCallback");
|
||||
|
||||
@@ -89,7 +89,9 @@ ICALL_TYPE(TLS_PROVIDER_FACTORY, "Mono.Net.Security.MonoTlsProviderFactory", TLS
|
||||
ICALL(TLS_PROVIDER_FACTORY_1, "IsBtlsSupported", ves_icall_Mono_TlsProviderFactory_IsBtlsSupported)
|
||||
|
||||
ICALL_TYPE(RUNTIME, "Mono.Runtime", RUNTIME_1)
|
||||
HANDLES(ICALL(RUNTIME_1, "GetDisplayName", ves_icall_Mono_Runtime_GetDisplayName))
|
||||
ICALL(RUNTIME_1, "DisableMicrosoftTelemetry", ves_icall_Mono_Runtime_DisableMicrosoftTelemetry)
|
||||
ICALL(RUNTIME_2, "EnableMicrosoftTelemetry_internal", ves_icall_Mono_Runtime_EnableMicrosoftTelemetry)
|
||||
HANDLES(ICALL(RUNTIME_3, "GetDisplayName", ves_icall_Mono_Runtime_GetDisplayName))
|
||||
HANDLES(ICALL(RUNTIME_12, "GetNativeStackTrace", ves_icall_Mono_Runtime_GetNativeStackTrace))
|
||||
|
||||
ICALL_TYPE(RTCLASS, "Mono.RuntimeClassHandle", RTCLASS_1)
|
||||
|
||||
@@ -98,6 +98,7 @@
|
||||
#include <mono/utils/mono-threads.h>
|
||||
#include <mono/metadata/w32error.h>
|
||||
#include <mono/utils/w32api.h>
|
||||
#include <mono/utils/mono-merp.h>
|
||||
|
||||
#include "decimal-ms.h"
|
||||
#include "number-ms.h"
|
||||
@@ -5680,6 +5681,28 @@ ves_icall_Mono_RuntimeMarshal_FreeAssemblyName (MonoAssemblyName *aname, gboolea
|
||||
g_free (aname);
|
||||
}
|
||||
|
||||
ICALL_EXPORT void
|
||||
ves_icall_Mono_Runtime_DisableMicrosoftTelemetry (void)
|
||||
{
|
||||
#ifdef TARGET_OSX
|
||||
mono_merp_disable ();
|
||||
#else
|
||||
// Icall has platform check in managed too.
|
||||
g_assert_not_reached ();
|
||||
#endif
|
||||
}
|
||||
|
||||
ICALL_EXPORT void
|
||||
ves_icall_Mono_Runtime_EnableMicrosoftTelemetry (char *appBundleID, char *appSignature, char *appVersion, char *merpGUIPath)
|
||||
{
|
||||
#ifdef TARGET_OSX
|
||||
mono_merp_enable (appBundleID, appSignature, appVersion, merpGUIPath);
|
||||
#else
|
||||
// Icall has platform check in managed too.
|
||||
g_assert_not_reached ();
|
||||
#endif
|
||||
}
|
||||
|
||||
ICALL_EXPORT MonoBoolean
|
||||
ves_icall_System_Reflection_AssemblyName_ParseAssemblyName (const char *name, MonoAssemblyName *aname, MonoBoolean *is_version_defined_arg, MonoBoolean *is_token_defined_arg)
|
||||
{
|
||||
|
||||
@@ -1081,7 +1081,7 @@ mono_class_compute_gc_descriptor (MonoClass *klass)
|
||||
for (int pos = 0; pos < weak_bitmap_nbits; ++pos) {
|
||||
if (weak_bitmap [pos / BITMAP_EL_SIZE] & ((gsize)1) << (pos % BITMAP_EL_SIZE)) {
|
||||
/* Clear the normal bitmap so these refs don't keep an object alive */
|
||||
bitmap [pos / BITMAP_EL_SIZE] &= ~((gsize)1) << (pos % BITMAP_EL_SIZE);
|
||||
bitmap [pos / BITMAP_EL_SIZE] &= ~(((gsize)1) << (pos % BITMAP_EL_SIZE));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3008,6 +3008,7 @@ thread_detach (MonoThreadInfo *info)
|
||||
* the thread */
|
||||
|
||||
g_assert (info);
|
||||
g_assert (mono_thread_info_is_current (info));
|
||||
|
||||
if (!mono_thread_info_try_get_internal_thread_gchandle (info, &gchandle))
|
||||
return;
|
||||
@@ -3015,8 +3016,6 @@ thread_detach (MonoThreadInfo *info)
|
||||
internal = (MonoInternalThread*) mono_gchandle_get_target (gchandle);
|
||||
g_assert (internal);
|
||||
|
||||
mono_gchandle_free (gchandle);
|
||||
|
||||
mono_thread_detach_internal (internal);
|
||||
}
|
||||
|
||||
|
||||
@@ -791,6 +791,7 @@ hybridcheck:
|
||||
|
||||
fullaot_regtests = $(regtests)
|
||||
fullaot_testing_deps = generics-variant-types.dll TestDriver.dll MemoryIntrinsics.dll
|
||||
fullaot_testing_deps_commas = generics-variant-types.dll,TestDriver.dll,MemoryIntrinsics.dll
|
||||
|
||||
FULLAOT_LIBS_UNIVERSAL = \
|
||||
mscorlib.dll \
|
||||
@@ -830,7 +831,7 @@ fullaotcheck: $(mono) $(fullaot_regtests) $(fullaot_testing_deps)
|
||||
mkdir $(FULLAOT_TMP_DIR)
|
||||
$(MAKE) fullaot-libs AOT_FLAGS="$(FULLAOT_AOT_ARGS),$(MONO_FULLAOT_ADDITIONAL_ARGS)$(INVARIANT_AOT_OPTIONS)" GSHAREDVT=$(GSHAREDVT)
|
||||
cp $(regtests) $(fullaot_regtests) $(fullaot_testing_deps) $(FULLAOT_TMP_DIR)/
|
||||
MONO_PATH=$(FULLAOT_TMP_DIR) $(top_builddir)/runtime/mono-wrapper $(MOBILE_RUNTIME_ARG) $(LLVM_AOT_RUNTIME_OPTS) $(GSHAREDVT_RUNTIME_OPTS) --aot="$(FULLAOT_AOT_ARGS),$(MONO_FULLAOT_ADDITIONAL_ARGS)$(INVARIANT_AOT_OPTIONS)" $(FULLAOT_TMP_DIR)/{*.dll,*.exe} || exit 1
|
||||
MONO_PATH=$(FULLAOT_TMP_DIR) $(top_builddir)/runtime/mono-wrapper $(MOBILE_RUNTIME_ARG) $(LLVM_AOT_RUNTIME_OPTS) $(GSHAREDVT_RUNTIME_OPTS) --aot="$(FULLAOT_AOT_ARGS),$(MONO_FULLAOT_ADDITIONAL_ARGS)$(INVARIANT_AOT_OPTIONS)" $(FULLAOT_TMP_DIR)/{$(fullaot_testing_deps_commas),*.exe} || exit 1
|
||||
ln -s $(if $(MONO_EXECUTABLE),$(MONO_EXECUTABLE),$$PWD/mono) $(FULLAOT_TMP_DIR)/
|
||||
for i in $(fullaot_regtests); do echo $$i; MONO_PATH=$(FULLAOT_TMP_DIR) $(top_builddir)/runtime/mono-wrapper $(MOBILE_RUNTIME_ARG) $(FULLAOT_ARGS) $(FULLAOT_TMP_DIR)/$$i --exclude '!FULLAOT' $(ARCH_FULLAOT_EXCLUDE) || exit 1; done
|
||||
|
||||
@@ -853,7 +854,7 @@ llvmonlycheck: mono $(llvmonly_regtests)
|
||||
mkdir fullaot-tmp
|
||||
$(MAKE) fullaot-libs AOT_FLAGS="llvmonly,$(MONO_FULLAOT_ADDITIONAL_ARGS)$(INVARIANT_AOT_OPTIONS)"
|
||||
cp $(llvmonly_regtests) $(fullaot_testing_deps) fullaot-tmp/
|
||||
MONO_PATH=fullaot-tmp $(top_builddir)/runtime/mono-wrapper $(MOBILE_RUNTIME_ARG) --aot=llvmonly fullaot-tmp/{*.dll,*.exe} || exit 1
|
||||
MONO_PATH=fullaot-tmp $(top_builddir)/runtime/mono-wrapper $(MOBILE_RUNTIME_ARG) --aot=llvmonly fullaot-tmp/{$(fullaot_testing_deps_commas),*.exe} || exit 1
|
||||
ln -s $$PWD/mono fullaot-tmp/
|
||||
for i in $(llvmonly_regtests); do echo $$i; MONO_PATH=fullaot-tmp $(top_builddir)/runtime/mono-wrapper $(MOBILE_RUNTIME_ARG) --llvmonly fullaot-tmp/$$i --exclude '!BITCODE' || exit 1; done
|
||||
|
||||
|
||||
@@ -6244,6 +6244,10 @@ emit_exception_debug_info (MonoAotCompile *acfg, MonoCompile *cfg, gboolean stor
|
||||
seq_points_size = (store_seq_points)? mono_seq_point_info_get_write_size (seq_points) : 0;
|
||||
|
||||
buf_size = header->num_clauses * 256 + debug_info_size + 2048 + seq_points_size + cfg->gc_map_size;
|
||||
if (jinfo->has_try_block_holes) {
|
||||
MonoTryBlockHoleTableJitInfo *table = mono_jit_info_get_try_block_hole_table_info (jinfo);
|
||||
buf_size += table->num_holes * 16;
|
||||
}
|
||||
|
||||
p = buf = (guint8 *)g_malloc (buf_size);
|
||||
|
||||
|
||||
@@ -216,6 +216,7 @@ class Tests
|
||||
return 0;
|
||||
}
|
||||
|
||||
[Category ("!INTERPRETER")]
|
||||
static int test_42_arm64_dyncall_vtypebyval () {
|
||||
var method = typeof (Foo5<string>).GetMethod ("vtype_by_val").MakeGenericMethod (new Type [] { typeof (int), typeof (long?), typeof (long?), typeof (long?), typeof (long?) });
|
||||
long res = (long)method.Invoke (null, new object [] { 1, 2L, 3L, 4L, 42L });
|
||||
@@ -509,4 +510,10 @@ class Tests
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static int test_0_regress_gh_7364 () {
|
||||
var map1 = new Dictionary <Type, IntPtr> (EqualityComparer<Type>.Default);
|
||||
var map2 = new Dictionary <IntPtr, WeakReference> (EqualityComparer<IntPtr>.Default);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
+11
-11
@@ -88,8 +88,8 @@ cond_exc_nc: len:8
|
||||
cond_exc_ne_un: len:8
|
||||
cond_exc_no: len:8
|
||||
cond_exc_ov: len:8
|
||||
div_imm: dest:i src1:i src2:i len:24
|
||||
div_un_imm: dest:i src1:i src2:i len:24
|
||||
div_imm: dest:i src1:i len:24
|
||||
div_un_imm: dest:i src1:i len:24
|
||||
endfinally: len:8
|
||||
fcall: dest:g len:26 clob:c
|
||||
fcall_membase: dest:g src1:b len:14 clob:c
|
||||
@@ -163,7 +163,7 @@ loadu2_membase: dest:i src1:b len:30
|
||||
loadu4_mem: dest:i len:8
|
||||
loadu4_membase: dest:i src1:b len:30
|
||||
localloc: dest:i src1:i len:106
|
||||
memory_barrier: len: 10
|
||||
memory_barrier: len:10
|
||||
move: dest:i src1:i len:4
|
||||
mul_imm: dest:i src1:i len:24
|
||||
nop: len:4
|
||||
@@ -176,9 +176,9 @@ rethrow: src1:i len:26
|
||||
or_imm: dest:i src1:i len:24
|
||||
r4const: dest:f len:26
|
||||
r8const: dest:f len:24
|
||||
rem_imm: dest:i src1:i src2:i len:24
|
||||
rem_un_imm: dest:i src1:i src2:i len:24
|
||||
s390_bkchain: len: 8 dest:i src1:i
|
||||
rem_imm: dest:i src1:i len:24
|
||||
rem_un_imm: dest:i src1:i len:24
|
||||
s390_bkchain: len:8 dest:i src1:i
|
||||
s390_move: len:48 dest:b src1:b
|
||||
s390_setf4ret: dest:f src1:f len:4
|
||||
sbb: dest:i src1:i src2:i len:6
|
||||
@@ -303,7 +303,7 @@ long_xor: dest:i src1:i src2:i len:8
|
||||
long_neg: dest:i src1:i len:6
|
||||
long_not: dest:i src1:i len:12
|
||||
long_rem: dest:i src1:i src2:i len:12
|
||||
long_rem_imm: dest:i src1:i src2:i len:12
|
||||
long_rem_imm: dest:i src1:i len:12
|
||||
long_rem_un: dest:i src1:i src2:i len:16
|
||||
long_shl: dest:i src1:i src2:i len:14
|
||||
long_shl_imm: dest:i src1:i len:14
|
||||
@@ -320,7 +320,7 @@ long_conv_to_i2: dest:i src1:i len:12
|
||||
long_conv_to_i4: dest:i src1:i len:4
|
||||
long_conv_to_i8: dest:i src1:i len:4
|
||||
long_conv_to_i: dest:i src1:i len:4
|
||||
long_conv_to_ovf_i: dest:i src1:i src2:i len:44
|
||||
long_conv_to_ovf_i: dest:i src1:i len:44
|
||||
long_conv_to_ovf_i4_un: dest:i src1:i len:50
|
||||
long_conv_to_ovf_u4: dest:i src1:i len:48
|
||||
long_conv_to_ovf_u8_un: dest:i src1:i len:4
|
||||
@@ -412,7 +412,7 @@ s390_crj: src1:i src2:i len:24
|
||||
s390_crj_un: src1:i src2:i len:24
|
||||
s390_cgrj: src1:i src2:i len:24
|
||||
s390_cgrj_un: src1:i src2:i len:24
|
||||
s390_cij: src1:i len:24
|
||||
s390_cij: len:24
|
||||
s390_cij_un: src1:i len:24
|
||||
s390_cgij: src1:i len:24
|
||||
s390_cgij_un: src1:i len:24
|
||||
s390_cgij: len:24
|
||||
s390_cgij_un: len:24
|
||||
+80
-29
@@ -577,6 +577,7 @@ typedef struct {
|
||||
int async_id;
|
||||
/* Used to know if we are in process of async step-out and distishing from exception breakpoints */
|
||||
MonoMethod* async_stepout_method;
|
||||
int refcount;
|
||||
} SingleStepReq;
|
||||
|
||||
/*
|
||||
@@ -695,7 +696,7 @@ static MonoCoopCond debugger_thread_exited_cond;
|
||||
static MonoCoopMutex debugger_thread_exited_mutex;
|
||||
|
||||
/* The single step request instance */
|
||||
static SingleStepReq *ss_req;
|
||||
static SingleStepReq *the_ss_req;
|
||||
|
||||
#ifdef MONO_ARCH_SOFT_DEBUG_SUPPORTED
|
||||
/* Number of single stepping operations in progress */
|
||||
@@ -799,6 +800,8 @@ static void ss_start (SingleStepReq *ss_req, MonoMethod *method, SeqPoint *sp, M
|
||||
StackFrame **frames, int nframes);
|
||||
static ErrorCode ss_create (MonoInternalThread *thread, StepSize size, StepDepth depth, StepFilter filter, EventRequest *req);
|
||||
static void ss_destroy (SingleStepReq *req);
|
||||
static SingleStepReq* ss_req_acquire (void);
|
||||
static void ss_req_release (SingleStepReq *req);
|
||||
|
||||
static void start_debugger_thread (void);
|
||||
static void stop_debugger_thread (void);
|
||||
@@ -2438,7 +2441,10 @@ buffer_add_methodid (Buffer *buf, MonoDomain *domain, MonoMethod *method)
|
||||
char *s;
|
||||
|
||||
s = mono_method_full_name (method, 1);
|
||||
DEBUG_PRINTF (2, "[dbg] send method [%s]\n", s);
|
||||
if (is_debugger_thread ())
|
||||
DEBUG_PRINTF (2, "[dbg] send method [%s]\n", s);
|
||||
else
|
||||
DEBUG_PRINTF (2, "[%p] send method [%s]\n", (gpointer) (gsize) mono_native_thread_id_get (), s);
|
||||
g_free (s);
|
||||
}
|
||||
}
|
||||
@@ -4667,14 +4673,14 @@ ss_update (SingleStepReq *req, MonoJitInfo *ji, SeqPoint *sp, DebuggerTlsData *t
|
||||
MonoDebugSourceLocation *loc = NULL;
|
||||
gboolean hit = TRUE;
|
||||
|
||||
if ((ss_req->filter & STEP_FILTER_STATIC_CTOR)) {
|
||||
if ((req->filter & STEP_FILTER_STATIC_CTOR)) {
|
||||
mono_thread_state_init_from_monoctx (&tls->context, ctx);
|
||||
compute_frame_info (tls->thread, tls);
|
||||
|
||||
gboolean ret = FALSE;
|
||||
gboolean method_in_stack = FALSE;
|
||||
|
||||
for (int i=0; i < tls->frame_count; i++) {
|
||||
for (int i = 0; i < tls->frame_count; i++) {
|
||||
MonoMethod *external_method = tls->frames [i]->method;
|
||||
if (method == external_method)
|
||||
method_in_stack = TRUE;
|
||||
@@ -4731,9 +4737,9 @@ ss_update (SingleStepReq *req, MonoJitInfo *ji, SeqPoint *sp, DebuggerTlsData *t
|
||||
}
|
||||
}
|
||||
|
||||
if (req->depth == STEP_DEPTH_INTO && req->size == STEP_SIZE_MIN && (sp->flags & MONO_SEQ_POINT_FLAG_NONEMPTY_STACK) && ss_req->start_method){
|
||||
if (req->depth == STEP_DEPTH_INTO && req->size == STEP_SIZE_MIN && (sp->flags & MONO_SEQ_POINT_FLAG_NONEMPTY_STACK) && req->start_method) {
|
||||
ss_calculate_framecount (tls, ctx);
|
||||
if (ss_req->start_method == method && req->nframes && tls->frame_count == req->nframes) {//Check also frame count(could be recursion)
|
||||
if (req->start_method == method && req->nframes && tls->frame_count == req->nframes) { //Check also frame count(could be recursion)
|
||||
DEBUG_PRINTF (1, "[%p] Seq point at nonempty stack %x while stepping in, continuing single stepping.\n", (gpointer) (gsize) mono_native_thread_id_get (), sp->il_offset);
|
||||
return FALSE;
|
||||
}
|
||||
@@ -4761,9 +4767,9 @@ ss_update (SingleStepReq *req, MonoJitInfo *ji, SeqPoint *sp, DebuggerTlsData *t
|
||||
|
||||
if (!loc) {
|
||||
DEBUG_PRINTF (1, "[%p] No line number info for il offset %x, continuing single stepping.\n", (gpointer) (gsize) mono_native_thread_id_get (), sp->il_offset);
|
||||
ss_req->last_method = method;
|
||||
req->last_method = method;
|
||||
hit = FALSE;
|
||||
} else if (loc && method == ss_req->last_method && loc->row == ss_req->last_line) {
|
||||
} else if (loc && method == req->last_method && loc->row == req->last_line) {
|
||||
ss_calculate_framecount (tls, ctx);
|
||||
if (tls->frame_count == req->nframes) { // If the frame has changed we're clearly not on the same source line.
|
||||
DEBUG_PRINTF (1, "[%p] Same source line (%d), continuing single stepping.\n", (gpointer) (gsize) mono_native_thread_id_get (), loc->row);
|
||||
@@ -4772,8 +4778,8 @@ ss_update (SingleStepReq *req, MonoJitInfo *ji, SeqPoint *sp, DebuggerTlsData *t
|
||||
}
|
||||
|
||||
if (loc) {
|
||||
ss_req->last_method = method;
|
||||
ss_req->last_line = loc->row;
|
||||
req->last_method = method;
|
||||
req->last_line = loc->row;
|
||||
mono_debug_free_source_location (loc);
|
||||
}
|
||||
|
||||
@@ -4953,6 +4959,12 @@ process_breakpoint (DebuggerTlsData *tls, gboolean from_signal)
|
||||
SeqPoint sp;
|
||||
gboolean found_sp;
|
||||
|
||||
if (suspend_count > 0) {
|
||||
/* Could be hit if we were suspended in native code */
|
||||
process_suspend (tls, ctx);
|
||||
return;
|
||||
}
|
||||
|
||||
// FIXME: Speed this up
|
||||
|
||||
ip = (guint8 *)MONO_CONTEXT_GET_IP (ctx);
|
||||
@@ -5261,6 +5273,7 @@ process_single_step_inner (DebuggerTlsData *tls, gboolean from_signal)
|
||||
MonoMethod *method;
|
||||
SeqPoint sp;
|
||||
MonoSeqPointInfo *info;
|
||||
SingleStepReq *ss_req;
|
||||
|
||||
/* Skip the instruction causing the single step */
|
||||
if (from_signal)
|
||||
@@ -5274,12 +5287,17 @@ process_single_step_inner (DebuggerTlsData *tls, gboolean from_signal)
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* This can run concurrently with a clear_event_request () call, so needs locking/reference counts.
|
||||
*/
|
||||
ss_req = ss_req_acquire ();
|
||||
|
||||
if (!ss_req)
|
||||
// FIXME: A suspend race
|
||||
return;
|
||||
|
||||
if (mono_thread_internal_current () != ss_req->thread)
|
||||
return;
|
||||
goto exit;
|
||||
|
||||
ip = (guint8 *)MONO_CONTEXT_GET_IP (ctx);
|
||||
|
||||
@@ -5294,7 +5312,7 @@ process_single_step_inner (DebuggerTlsData *tls, gboolean from_signal)
|
||||
g_assert (method);
|
||||
|
||||
if (method->wrapper_type && method->wrapper_type != MONO_WRAPPER_DYNAMIC_METHOD)
|
||||
return;
|
||||
goto exit;
|
||||
|
||||
/*
|
||||
* FIXME:
|
||||
@@ -5302,7 +5320,7 @@ process_single_step_inner (DebuggerTlsData *tls, gboolean from_signal)
|
||||
* Stopping in memcpy makes half-copied vtypes visible.
|
||||
*/
|
||||
if (method->klass == mono_defaults.string_class && (!strcmp (method->name, "memset") || strstr (method->name, "memcpy")))
|
||||
return;
|
||||
goto exit;
|
||||
|
||||
/*
|
||||
* This could be in ss_update method, but mono_find_next_seq_point_for_native_offset is pretty expensive method,
|
||||
@@ -5316,23 +5334,22 @@ process_single_step_inner (DebuggerTlsData *tls, gboolean from_signal)
|
||||
break;
|
||||
}
|
||||
if (!found)
|
||||
return;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* The ip points to the instruction causing the single step event, which is before
|
||||
* the offset recorded in the seq point map, so find the next seq point after ip.
|
||||
*/
|
||||
if (!mono_find_next_seq_point_for_native_offset (domain, method, (guint8*)ip - (guint8*)ji->code_start, &info, &sp)) {
|
||||
g_assert_not_reached ();
|
||||
return;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
il_offset = sp.il_offset;
|
||||
|
||||
if (!ss_update (ss_req, ji, &sp, tls, ctx, method))
|
||||
return;
|
||||
goto exit;
|
||||
|
||||
/* Start single stepping again from the current sequence point */
|
||||
ss_start (ss_req, method, &sp, info, ctx, tls, FALSE, NULL, 0);
|
||||
@@ -5340,7 +5357,7 @@ process_single_step_inner (DebuggerTlsData *tls, gboolean from_signal)
|
||||
if ((ss_req->filter & STEP_FILTER_STATIC_CTOR) &&
|
||||
(method->flags & METHOD_ATTRIBUTE_SPECIAL_NAME) &&
|
||||
!strcmp (method->name, ".cctor"))
|
||||
return;
|
||||
goto exit;
|
||||
|
||||
// FIXME: Has to lock earlier
|
||||
|
||||
@@ -5357,6 +5374,9 @@ process_single_step_inner (DebuggerTlsData *tls, gboolean from_signal)
|
||||
mono_loader_unlock ();
|
||||
|
||||
process_event (EVENT_KIND_STEP, jinfo_get_method (ji), il_offset, ctx, events, suspend_policy);
|
||||
|
||||
exit:
|
||||
ss_req_release (ss_req);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -5855,19 +5875,20 @@ ss_create (MonoInternalThread *thread, StepSize size, StepDepth depth, StepFilte
|
||||
wait_for_suspend ();
|
||||
|
||||
// FIXME: Multiple requests
|
||||
if (ss_req) {
|
||||
if (the_ss_req) {
|
||||
DEBUG_PRINTF (0, "Received a single step request while the previous one was still active.\n");
|
||||
return ERR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
DEBUG_PRINTF (1, "[dbg] Starting single step of thread %p (depth=%s).\n", thread, ss_depth_to_string (depth));
|
||||
|
||||
ss_req = g_new0 (SingleStepReq, 1);
|
||||
SingleStepReq *ss_req = g_new0 (SingleStepReq, 1);
|
||||
ss_req->req = req;
|
||||
ss_req->thread = thread;
|
||||
ss_req->size = size;
|
||||
ss_req->depth = depth;
|
||||
ss_req->filter = filter;
|
||||
ss_req->refcount = 1;
|
||||
req->info = ss_req;
|
||||
|
||||
for (int i = 0; i < req->nmodifiers; i++) {
|
||||
@@ -5967,6 +5988,8 @@ ss_create (MonoInternalThread *thread, StepSize size, StepDepth depth, StepFilte
|
||||
|
||||
ss_req->start_method = method;
|
||||
|
||||
the_ss_req = ss_req;
|
||||
|
||||
ss_start (ss_req, method, sp, info, set_ip ? &tls->restore_state.ctx : &tls->context.ctx, tls, step_to_catch, frames, nframes);
|
||||
|
||||
if (frames)
|
||||
@@ -5978,13 +6001,11 @@ ss_create (MonoInternalThread *thread, StepSize size, StepDepth depth, StepFilte
|
||||
static void
|
||||
ss_destroy (SingleStepReq *req)
|
||||
{
|
||||
// FIXME: Locking
|
||||
g_assert (ss_req == req);
|
||||
DEBUG_PRINTF (1, "[dbg] ss_destroy.\n");
|
||||
|
||||
ss_stop (ss_req);
|
||||
ss_stop (req);
|
||||
|
||||
g_free (ss_req);
|
||||
ss_req = NULL;
|
||||
g_free (req);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -5995,10 +6016,10 @@ ss_clear_for_assembly (SingleStepReq *req, MonoAssembly *assembly)
|
||||
|
||||
while (found) {
|
||||
found = FALSE;
|
||||
for (l = ss_req->bps; l; l = l->next) {
|
||||
for (l = req->bps; l; l = l->next) {
|
||||
if (breakpoint_matches_assembly ((MonoBreakpoint *)l->data, assembly)) {
|
||||
clear_breakpoint ((MonoBreakpoint *)l->data);
|
||||
ss_req->bps = g_slist_delete_link (ss_req->bps, l);
|
||||
req->bps = g_slist_delete_link (req->bps, l);
|
||||
found = TRUE;
|
||||
break;
|
||||
}
|
||||
@@ -6006,6 +6027,34 @@ ss_clear_for_assembly (SingleStepReq *req, MonoAssembly *assembly)
|
||||
}
|
||||
}
|
||||
|
||||
static SingleStepReq*
|
||||
ss_req_acquire (void)
|
||||
{
|
||||
SingleStepReq *req;
|
||||
|
||||
dbg_lock ();
|
||||
req = the_ss_req;
|
||||
if (req)
|
||||
req->refcount ++;
|
||||
dbg_unlock ();
|
||||
return req;
|
||||
}
|
||||
|
||||
static void
|
||||
ss_req_release (SingleStepReq *req)
|
||||
{
|
||||
gboolean free = FALSE;
|
||||
|
||||
dbg_lock ();
|
||||
g_assert (req->refcount);
|
||||
req->refcount --;
|
||||
if (req->refcount == 0)
|
||||
free = TRUE;
|
||||
dbg_unlock ();
|
||||
if (free)
|
||||
ss_destroy (req);
|
||||
}
|
||||
|
||||
/*
|
||||
* Called from metadata by the icall for System.Diagnostics.Debugger:Log ().
|
||||
*/
|
||||
@@ -6948,8 +6997,10 @@ clear_event_request (int req_id, int etype)
|
||||
if (req->id == req_id && req->event_kind == etype) {
|
||||
if (req->event_kind == EVENT_KIND_BREAKPOINT)
|
||||
clear_breakpoint ((MonoBreakpoint *)req->info);
|
||||
if (req->event_kind == EVENT_KIND_STEP)
|
||||
ss_destroy ((SingleStepReq *)req->info);
|
||||
if (req->event_kind == EVENT_KIND_STEP) {
|
||||
ss_req_release ((SingleStepReq *)req->info);
|
||||
the_ss_req = NULL;
|
||||
}
|
||||
if (req->event_kind == EVENT_KIND_METHOD_ENTRY)
|
||||
clear_breakpoint ((MonoBreakpoint *)req->info);
|
||||
if (req->event_kind == EVENT_KIND_METHOD_EXIT)
|
||||
|
||||
@@ -1409,6 +1409,31 @@ class Tests
|
||||
swap (ref obj.buffer1, ref obj.buffer2);
|
||||
return obj.counter;
|
||||
}
|
||||
|
||||
public interface ICompletion {
|
||||
Type UnsafeOnCompleted ();
|
||||
}
|
||||
|
||||
public struct TaskAwaiter<T> : ICompletion {
|
||||
public Type UnsafeOnCompleted () {
|
||||
typeof(T).GetHashCode ();
|
||||
return typeof(T);
|
||||
}
|
||||
}
|
||||
|
||||
public struct AStruct {
|
||||
public Type Caller<TAwaiter>(ref TAwaiter awaiter)
|
||||
where TAwaiter : ICompletion {
|
||||
return awaiter.UnsafeOnCompleted();
|
||||
}
|
||||
}
|
||||
|
||||
public static int test_0_partial_constrained_call_llvmonly () {
|
||||
var builder = new AStruct ();
|
||||
var awaiter = new TaskAwaiter<bool> ();
|
||||
var res = builder.Caller (ref awaiter);
|
||||
return res == typeof (bool) ? 0 : 1;
|
||||
}
|
||||
}
|
||||
|
||||
#if !__MOBILE__
|
||||
|
||||
@@ -3136,4 +3136,68 @@ L_3:
|
||||
ldc.i4.0
|
||||
ret
|
||||
}
|
||||
|
||||
// Test that calli does signature checking
|
||||
.method public static int32 calli_sig_check (string s) cil managed
|
||||
{
|
||||
.maxstack 16
|
||||
ldc.i4.0
|
||||
ret
|
||||
}
|
||||
|
||||
.method public static int32 calli_sig_check_2 () cil managed
|
||||
{
|
||||
.maxstack 16
|
||||
|
||||
ldc.r4 1.13
|
||||
ldftn int32 Tests::calli_sig_check(string)
|
||||
calli int32(string)
|
||||
ret
|
||||
}
|
||||
|
||||
.method public static int32 test_0_calli_sig_check () cil managed
|
||||
{
|
||||
.custom instance void [TestDriver]CategoryAttribute::.ctor(string) = ( 01 00 0C 21 49 4E 54 45 52 50 52 45 54 45 52 00 00 ) // ...!INTERPRETER.
|
||||
.custom instance void class [TestDriver]CategoryAttribute::'.ctor'(string) = (01 00 08 21 46 55 4C 4C 41 4F 54 00 00 ) // ...!FULLAOT..
|
||||
.maxstack 16
|
||||
|
||||
.try {
|
||||
call int32 Tests::calli_sig_check_2()
|
||||
pop
|
||||
leave L0
|
||||
} catch [mscorlib]System.InvalidProgramException {
|
||||
pop
|
||||
leave L1
|
||||
}
|
||||
|
||||
L0:
|
||||
ldc.i4.1
|
||||
ret
|
||||
L1:
|
||||
ldc.i4.0
|
||||
ret
|
||||
}
|
||||
|
||||
.method public hidebysig static int32 test_1_dont_verify_ptr_byrefs () cil managed
|
||||
{
|
||||
.locals init (int32 v_0, int32 *& v_2, int32 *v_1)
|
||||
|
||||
//v_0 = 1
|
||||
ldc.i4.1
|
||||
stloc.0
|
||||
|
||||
//v_1 = &v_0 < bad store of `int32&` to ìnt32*&` but must work
|
||||
ldloca v_0
|
||||
stloc.1
|
||||
|
||||
//v_2 = (intptr)v_1
|
||||
ldloc.1
|
||||
conv.u
|
||||
stloc.2
|
||||
|
||||
//return *v_2
|
||||
ldloc.2
|
||||
ldind.i4
|
||||
ret
|
||||
}
|
||||
}
|
||||
@@ -1850,8 +1850,8 @@ target_type_is_incompatible (MonoCompile *cfg, MonoType *target, MonoInst *arg)
|
||||
MonoClass *target_class_lowered = mono_class_from_mono_type (mini_get_underlying_type (&mono_class_from_mono_type (target)->byval_arg));
|
||||
MonoClass *source_class_lowered = mono_class_from_mono_type (mini_get_underlying_type (&arg->klass->byval_arg));
|
||||
|
||||
/* if the target is native int& or same type */
|
||||
if (target->type == MONO_TYPE_I || target_class_lowered == source_class_lowered)
|
||||
/* if the target is native int& or X* or same type */
|
||||
if (target->type == MONO_TYPE_I || target->type == MONO_TYPE_PTR || target_class_lowered == source_class_lowered)
|
||||
return 0;
|
||||
|
||||
/* Both are primitive type byrefs and the source points to a larger type that the destination */
|
||||
@@ -8210,6 +8210,9 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
|
||||
|
||||
sp -= n;
|
||||
|
||||
if (!(cfg->method->wrapper_type && cfg->method->wrapper_type != MONO_WRAPPER_DYNAMIC_METHOD) && check_call_signature (cfg, fsig, sp))
|
||||
UNVERIFIED;
|
||||
|
||||
inline_costs += 10 * num_calls++;
|
||||
|
||||
/*
|
||||
@@ -8530,7 +8533,11 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
|
||||
MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_IBEQ, is_ref_bb);
|
||||
|
||||
/* Non-ref case */
|
||||
nonbox_call = (MonoInst*)mini_emit_calli (cfg, fsig, sp, addr, NULL, NULL);
|
||||
if (cfg->llvm_only)
|
||||
/* addr is an ftndesc in this case */
|
||||
nonbox_call = emit_llvmonly_calli (cfg, fsig, sp, addr);
|
||||
else
|
||||
nonbox_call = (MonoInst*)mini_emit_calli (cfg, fsig, sp, addr, NULL, NULL);
|
||||
|
||||
MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_BR, end_bb);
|
||||
|
||||
@@ -8539,7 +8546,10 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
|
||||
EMIT_NEW_LOAD_MEMBASE_TYPE (cfg, ins, &constrained_class->byval_arg, sp [0]->dreg, 0);
|
||||
ins->klass = constrained_class;
|
||||
sp [0] = handle_box (cfg, ins, constrained_class, mono_class_check_context_used (constrained_class));
|
||||
ins = (MonoInst*)mini_emit_calli (cfg, fsig, sp, addr, NULL, NULL);
|
||||
if (cfg->llvm_only)
|
||||
ins = emit_llvmonly_calli (cfg, fsig, sp, addr);
|
||||
else
|
||||
ins = (MonoInst*)mini_emit_calli (cfg, fsig, sp, addr, NULL, NULL);
|
||||
|
||||
MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_BR, end_bb);
|
||||
|
||||
@@ -8551,7 +8561,10 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
|
||||
} else {
|
||||
g_assert (mono_class_is_interface (cmethod->klass));
|
||||
addr = emit_get_rgctx_virt_method (cfg, mono_class_check_context_used (constrained_class), constrained_class, cmethod, MONO_RGCTX_INFO_VIRT_METHOD_CODE);
|
||||
ins = (MonoInst*)mini_emit_calli (cfg, fsig, sp, addr, NULL, NULL);
|
||||
if (cfg->llvm_only)
|
||||
ins = emit_llvmonly_calli (cfg, fsig, sp, addr);
|
||||
else
|
||||
ins = (MonoInst*)mini_emit_calli (cfg, fsig, sp, addr, NULL, NULL);
|
||||
goto call_end;
|
||||
}
|
||||
} else if (constrained_class->valuetype && (cmethod->klass == mono_defaults.object_class || cmethod->klass == mono_defaults.enum_class->parent || cmethod->klass == mono_defaults.enum_class)) {
|
||||
|
||||
@@ -1603,9 +1603,8 @@ get_call_info (MonoMemPool *mp, MonoMethodSignature *sig)
|
||||
add_general (&gr, &stack_size, &cinfo->sig_cookie, TRUE);
|
||||
}
|
||||
|
||||
/* align stack size to 8 */
|
||||
DEBUG (g_print (" stack size: %d (%d)\n", (stack_size + 15) & ~15, stack_size));
|
||||
stack_size = (stack_size + 7) & ~7;
|
||||
stack_size = ALIGN_TO (stack_size, MONO_ARCH_FRAME_ALIGNMENT);
|
||||
|
||||
cinfo->stack_usage = stack_size;
|
||||
return cinfo;
|
||||
|
||||
@@ -64,6 +64,7 @@
|
||||
#include <mono/metadata/mono-endian.h>
|
||||
#include <mono/metadata/environment.h>
|
||||
#include <mono/metadata/mono-mlist.h>
|
||||
#include <mono/utils/mono-merp.h>
|
||||
#include <mono/utils/mono-mmap.h>
|
||||
#include <mono/utils/mono-logger-internals.h>
|
||||
#include <mono/utils/mono-error.h>
|
||||
@@ -2797,6 +2798,27 @@ mono_handle_native_crash (const char *signal, void *ctx, MONO_SIG_HANDLER_INFO_T
|
||||
prctl (PR_SET_PTRACER, pid, 0, 0, 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(TARGET_OSX)
|
||||
if (mono_merp_enabled ()) {
|
||||
if (pid == 0) {
|
||||
MonoContext mctx;
|
||||
if (!ctx) {
|
||||
mono_runtime_printf_err ("\nMust always pass non-null context when using merp.\n");
|
||||
exit (1);
|
||||
}
|
||||
|
||||
mono_sigctx_to_monoctx (ctx, &mctx);
|
||||
|
||||
intptr_t thread_pointer = (intptr_t) MONO_CONTEXT_GET_SP (&mctx);
|
||||
|
||||
mono_merp_invoke (crashed_pid, thread_pointer, signal);
|
||||
|
||||
exit (1);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (pid == 0) {
|
||||
dup2 (STDERR_FILENO, STDOUT_FILENO);
|
||||
|
||||
|
||||
@@ -1846,9 +1846,18 @@ instantiate_info (MonoDomain *domain, MonoRuntimeGenericContextInfoTemplate *oti
|
||||
|
||||
method = mono_class_inflate_generic_method_checked (method, context, error);
|
||||
return_val_if_nok (error, NULL);
|
||||
|
||||
addr = mono_compile_method_checked (method, error);
|
||||
return_val_if_nok (error, NULL);
|
||||
return mini_add_method_trampoline (method, addr, mono_method_needs_static_rgctx_invoke (method, FALSE), FALSE);
|
||||
if (mono_llvm_only) {
|
||||
gpointer arg = NULL;
|
||||
addr = mini_add_method_wrappers_llvmonly (method, addr, FALSE, FALSE, &arg);
|
||||
|
||||
/* Returns an ftndesc */
|
||||
return mini_create_llvmonly_ftndesc (domain, addr, arg);
|
||||
} else {
|
||||
return mini_add_method_trampoline (method, addr, mono_method_needs_static_rgctx_invoke (method, FALSE), FALSE);
|
||||
}
|
||||
}
|
||||
case MONO_RGCTX_INFO_VIRT_METHOD_BOX_TYPE: {
|
||||
MonoJumpInfoVirtMethod *info = (MonoJumpInfoVirtMethod *)data;
|
||||
|
||||
+23
-3
@@ -1011,6 +1011,26 @@ simd_op_to_llvm_type (int opcode)
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
set_preserveall_cc (LLVMValueRef func)
|
||||
{
|
||||
/*
|
||||
* xcode10 doesn't seem to support preserveall on watchos, it fails with:
|
||||
* fatal error: error in backend: Unsupported calling convention
|
||||
*/
|
||||
#ifndef TARGET_WATCHOS
|
||||
mono_llvm_set_preserveall_cc (func);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
set_call_preserveall_cc (LLVMValueRef func)
|
||||
{
|
||||
#ifndef TARGET_WATCHOS
|
||||
mono_llvm_set_call_preserveall_cc (func);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* get_bb:
|
||||
*
|
||||
@@ -2640,7 +2660,7 @@ emit_init_icall_wrapper (MonoLLVMModule *module, const char *name, const char *i
|
||||
}
|
||||
LLVMSetLinkage (func, LLVMInternalLinkage);
|
||||
mono_llvm_add_func_attr (func, LLVM_ATTR_NO_INLINE);
|
||||
mono_llvm_set_preserveall_cc (func);
|
||||
set_preserveall_cc (func);
|
||||
entry_bb = LLVMAppendBasicBlock (func, "ENTRY");
|
||||
builder = LLVMCreateBuilder ();
|
||||
LLVMPositionBuilderAtEnd (builder, entry_bb);
|
||||
@@ -2836,7 +2856,7 @@ emit_init_method (EmitContext *ctx)
|
||||
* This enables llvm to keep arguments in their original registers/
|
||||
* scratch registers, since the call will not clobber them.
|
||||
*/
|
||||
mono_llvm_set_call_preserveall_cc (call);
|
||||
set_call_preserveall_cc (call);
|
||||
|
||||
LLVMBuildBr (builder, inited_bb);
|
||||
ctx->bblocks [cfg->bb_entry->block_num].end_bblock = inited_bb;
|
||||
@@ -3542,7 +3562,7 @@ process_call (EmitContext *ctx, MonoBasicBlock *bb, LLVMBuilderRef *builder_ref,
|
||||
if (!sig->pinvoke && !cfg->llvm_only)
|
||||
LLVMSetInstructionCallConv (lcall, LLVMMono1CallConv);
|
||||
if (preserveall)
|
||||
mono_llvm_set_call_preserveall_cc (lcall);
|
||||
set_call_preserveall_cc (lcall);
|
||||
|
||||
if (cinfo->ret.storage == LLVMArgVtypeByRef)
|
||||
mono_llvm_add_instr_attr (lcall, 1 + cinfo->vret_arg_pindex, LLVM_ATTR_STRUCT_RET);
|
||||
|
||||
@@ -1207,7 +1207,7 @@ MINI_OP(OP_S390_ARGPTR, "s390_argptr", NONE, NONE, NONE)
|
||||
MINI_OP(OP_S390_STKARG, "s390_stkarg", NONE, NONE, NONE)
|
||||
MINI_OP(OP_S390_MOVE, "s390_move", IREG, IREG, NONE)
|
||||
MINI_OP(OP_S390_SETF4RET, "s390_setf4ret", FREG, FREG, NONE)
|
||||
MINI_OP(OP_S390_BKCHAIN, "s390_bkchain", NONE, NONE, NONE)
|
||||
MINI_OP(OP_S390_BKCHAIN, "s390_bkchain", IREG, IREG, NONE)
|
||||
MINI_OP(OP_S390_LADD, "s390_long_add", LREG, IREG, IREG)
|
||||
MINI_OP(OP_S390_LADD_OVF, "s390_long_add_ovf", LREG, IREG, IREG)
|
||||
MINI_OP(OP_S390_LADD_OVF_UN, "s390_long_add_ovf_un", LREG, IREG, IREG)
|
||||
|
||||
@@ -1992,11 +1992,6 @@ mono_jit_compile_method_with_opt (MonoMethod *method, guint32 opt, gboolean jit_
|
||||
|
||||
error_init (error);
|
||||
|
||||
if (mono_class_is_open_constructed_type (&method->klass->byval_arg)) {
|
||||
mono_error_set_invalid_operation (error, "Could not execute the method because the containing type is not fully instantiated.");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (mono_use_interpreter && !jit_only) {
|
||||
code = mini_get_interp_callbacks ()->create_method_pointer (method, error);
|
||||
if (code)
|
||||
@@ -2097,7 +2092,7 @@ lookup_start:
|
||||
* This is not a problem, since it will be initialized when the method is first
|
||||
* called by init_method ().
|
||||
*/
|
||||
if (!mono_llvm_only) {
|
||||
if (!mono_llvm_only && !mono_class_is_open_constructed_type (&method->klass->byval_arg)) {
|
||||
vtable = mono_class_vtable (domain, method->klass);
|
||||
g_assert (vtable);
|
||||
if (!mono_runtime_class_init_full (vtable, error))
|
||||
@@ -2125,6 +2120,10 @@ lookup_start:
|
||||
}
|
||||
|
||||
if (!code) {
|
||||
if (mono_class_is_open_constructed_type (&method->klass->byval_arg)) {
|
||||
mono_error_set_invalid_operation (error, "Could not execute the method because the containing type is not fully instantiated.");
|
||||
return NULL;
|
||||
}
|
||||
if (wait_or_register_method_to_compile (method, target_domain))
|
||||
goto lookup_start;
|
||||
code = mono_jit_compile_method_inner (method, target_domain, opt, error);
|
||||
|
||||
@@ -974,6 +974,7 @@ typedef enum {
|
||||
MONO_RGCTX_INFO_NULLABLE_CLASS_BOX,
|
||||
MONO_RGCTX_INFO_NULLABLE_CLASS_UNBOX,
|
||||
/* MONO_PATCH_INFO_VCALL_METHOD */
|
||||
/* In llvmonly mode, this is a function descriptor */
|
||||
MONO_RGCTX_INFO_VIRT_METHOD_CODE,
|
||||
/*
|
||||
* MONO_PATCH_INFO_VCALL_METHOD
|
||||
|
||||
+7
-37
@@ -175,34 +175,8 @@ typedef struct {
|
||||
|
||||
// Do not use these TLS macros directly unless you know what you're doing.
|
||||
|
||||
#ifdef HOST_WIN32
|
||||
|
||||
#define PROF_TLS_SET(VAL) (TlsSetValue (profiler_tls, (VAL)))
|
||||
#define PROF_TLS_GET() ((MonoProfilerThread *) TlsGetValue (profiler_tls))
|
||||
#define PROF_TLS_INIT() (profiler_tls = TlsAlloc ())
|
||||
#define PROF_TLS_FREE() (TlsFree (profiler_tls))
|
||||
|
||||
static DWORD profiler_tls;
|
||||
|
||||
#elif HAVE_KW_THREAD
|
||||
|
||||
#define PROF_TLS_SET(VAL) (profiler_tls = (VAL))
|
||||
#define PROF_TLS_GET() (profiler_tls)
|
||||
#define PROF_TLS_INIT()
|
||||
#define PROF_TLS_FREE()
|
||||
|
||||
static __thread MonoProfilerThread *profiler_tls;
|
||||
|
||||
#else
|
||||
|
||||
#define PROF_TLS_SET(VAL) (pthread_setspecific (profiler_tls, (VAL)))
|
||||
#define PROF_TLS_GET() ((MonoProfilerThread *) pthread_getspecific (profiler_tls))
|
||||
#define PROF_TLS_INIT() (pthread_key_create (&profiler_tls, NULL))
|
||||
#define PROF_TLS_FREE() (pthread_key_delete (profiler_tls))
|
||||
|
||||
static pthread_key_t profiler_tls;
|
||||
|
||||
#endif
|
||||
#define PROF_TLS_SET(VAL) mono_thread_info_set_tools_data (VAL)
|
||||
#define PROF_TLS_GET mono_thread_info_get_tools_data
|
||||
|
||||
static uintptr_t
|
||||
thread_id (void)
|
||||
@@ -556,7 +530,7 @@ init_thread (gboolean add_to_lls)
|
||||
clear_hazard_pointers (hp);
|
||||
}
|
||||
|
||||
PROF_TLS_SET (thread);
|
||||
g_assert (PROF_TLS_SET (thread));
|
||||
|
||||
return thread;
|
||||
}
|
||||
@@ -2657,9 +2631,9 @@ counters_emit (void)
|
||||
name = mono_counter_get_name (agent->counter);
|
||||
emit_value (logbuffer, mono_counter_get_section (agent->counter));
|
||||
emit_string (logbuffer, name, strlen (name) + 1);
|
||||
emit_value (logbuffer, mono_counter_get_type (agent->counter));
|
||||
emit_value (logbuffer, mono_counter_get_unit (agent->counter));
|
||||
emit_value (logbuffer, mono_counter_get_variance (agent->counter));
|
||||
emit_byte (logbuffer, mono_counter_get_type (agent->counter));
|
||||
emit_byte (logbuffer, mono_counter_get_unit (agent->counter));
|
||||
emit_byte (logbuffer, mono_counter_get_variance (agent->counter));
|
||||
emit_value (logbuffer, agent->index);
|
||||
|
||||
agent->emitted = TRUE;
|
||||
@@ -2746,7 +2720,7 @@ counters_sample (uint64_t timestamp)
|
||||
}
|
||||
|
||||
emit_uvalue (logbuffer, agent->index);
|
||||
emit_value (logbuffer, type);
|
||||
emit_byte (logbuffer, type);
|
||||
switch (type) {
|
||||
case MONO_COUNTER_INT:
|
||||
#if SIZEOF_VOID_P == 4
|
||||
@@ -3661,8 +3635,6 @@ log_shutdown (MonoProfiler *prof)
|
||||
|
||||
mono_coop_mutex_destroy (&log_profiler.api_mutex);
|
||||
|
||||
PROF_TLS_FREE ();
|
||||
|
||||
g_free (prof->args);
|
||||
}
|
||||
|
||||
@@ -4699,8 +4671,6 @@ mono_profiler_init_log (const char *desc)
|
||||
|
||||
init_time ();
|
||||
|
||||
PROF_TLS_INIT ();
|
||||
|
||||
create_profiler (desc, log_config.output_filename, filters);
|
||||
|
||||
mono_lls_init (&log_profiler.profiler_thread_list, NULL);
|
||||
|
||||
+5
-6
@@ -10,7 +10,7 @@
|
||||
#define LOG_HEADER_ID 0x4D505A01
|
||||
#define LOG_VERSION_MAJOR 2
|
||||
#define LOG_VERSION_MINOR 0
|
||||
#define LOG_DATA_VERSION 15
|
||||
#define LOG_DATA_VERSION 14
|
||||
|
||||
/*
|
||||
* Changes in major/minor versions:
|
||||
@@ -72,7 +72,6 @@
|
||||
removed type field from TYPE_SAMPLE_HIT
|
||||
removed MONO_GC_EVENT_{MARK,RECLAIM}_{START,END}
|
||||
reverted the root_type field back to uleb128
|
||||
* version 15: reverted the type, unit, and variance fields back to uleb128
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -298,16 +297,16 @@
|
||||
* if section == MONO_COUNTER_PERFCOUNTERS:
|
||||
* [section_name: string] section name of counter
|
||||
* [name: string] name of counter
|
||||
* [type: uleb128] type of counter
|
||||
* [unit: uleb128] unit of counter
|
||||
* [variance: uleb128] variance of counter
|
||||
* [type: byte] type of counter
|
||||
* [unit: byte] unit of counter
|
||||
* [variance: byte] variance of counter
|
||||
* [index: uleb128] unique index of counter
|
||||
* if exinfo == TYPE_SAMPLE_COUNTERS
|
||||
* while true:
|
||||
* [index: uleb128] unique index of counter
|
||||
* if index == 0:
|
||||
* break
|
||||
* [type: uleb128] type of counter value
|
||||
* [type: byte] type of counter value
|
||||
* if type == string:
|
||||
* if value == null:
|
||||
* [0: byte] 0 -> value is null
|
||||
|
||||
@@ -3003,7 +3003,7 @@ decode_buffer (ProfContext *ctx)
|
||||
}
|
||||
name = pstrdup ((char*)p);
|
||||
while (*p++);
|
||||
if (ctx->data_version > 12 && ctx->data_version < 15) {
|
||||
if (ctx->data_version > 12) {
|
||||
type = *p++;
|
||||
unit = *p++;
|
||||
variance = *p++;
|
||||
@@ -3040,7 +3040,7 @@ decode_buffer (ProfContext *ctx)
|
||||
}
|
||||
}
|
||||
|
||||
if (ctx->data_version > 12 && ctx->data_version < 15)
|
||||
if (ctx->data_version > 12)
|
||||
type = *p++;
|
||||
else
|
||||
type = decode_uleb128 (p, &p);
|
||||
|
||||
@@ -23,7 +23,13 @@
|
||||
#include "mono/sgen/sgen-workers.h"
|
||||
#include "mono/sgen/sgen-client.h"
|
||||
|
||||
#define MIN_MINOR_COLLECTION_ALLOWANCE ((mword)(SGEN_DEFAULT_NURSERY_SIZE * default_allowance_nursery_size_ratio))
|
||||
/*
|
||||
* The allowance we are targeting is a third of the current heap size. Still, we
|
||||
* allow the heap to grow at least 4 times the nursery size before triggering a
|
||||
* major, to reduce unnecessary collections. We make sure we don't set the minimum
|
||||
* allowance too high when using a soft heap limit.
|
||||
*/
|
||||
#define MIN_MINOR_COLLECTION_ALLOWANCE (MIN(((mword)(sgen_nursery_size * default_allowance_nursery_size_ratio)), (soft_heap_limit * SGEN_DEFAULT_ALLOWANCE_HEAP_SIZE_RATIO)))
|
||||
|
||||
static SgenPointerQueue log_entries = SGEN_POINTER_QUEUE_INIT (INTERNAL_MEM_TEMPORARY);
|
||||
static mono_mutex_t log_entries_mutex;
|
||||
|
||||
@@ -358,7 +358,7 @@ sgen_workers_create_context (int generation, int num_workers)
|
||||
{
|
||||
static gboolean stat_inited = FALSE;
|
||||
int i;
|
||||
WorkerData **workers_data_ptrs = (WorkerData**)sgen_alloc_internal_dynamic (num_workers * sizeof(WorkerData*), INTERNAL_MEM_WORKER_DATA, TRUE);
|
||||
WorkerData **workers_data_ptrs;
|
||||
WorkerContext *context = &worker_contexts [generation];
|
||||
|
||||
SGEN_ASSERT (0, !context->workers_num, "We can't init the worker context for a generation twice");
|
||||
@@ -366,20 +366,21 @@ sgen_workers_create_context (int generation, int num_workers)
|
||||
mono_os_mutex_init (&context->finished_lock);
|
||||
|
||||
context->generation = generation;
|
||||
context->workers_num = num_workers;
|
||||
context->active_workers_num = num_workers;
|
||||
context->workers_num = (num_workers > SGEN_THREADPOOL_MAX_NUM_THREADS) ? SGEN_THREADPOOL_MAX_NUM_THREADS : num_workers;
|
||||
context->active_workers_num = context->workers_num;
|
||||
|
||||
context->workers_data = (WorkerData *)sgen_alloc_internal_dynamic (sizeof (WorkerData) * num_workers, INTERNAL_MEM_WORKER_DATA, TRUE);
|
||||
memset (context->workers_data, 0, sizeof (WorkerData) * num_workers);
|
||||
context->workers_data = (WorkerData *)sgen_alloc_internal_dynamic (sizeof (WorkerData) * context->workers_num, INTERNAL_MEM_WORKER_DATA, TRUE);
|
||||
memset (context->workers_data, 0, sizeof (WorkerData) * context->workers_num);
|
||||
|
||||
init_distribute_gray_queue (context);
|
||||
|
||||
for (i = 0; i < num_workers; ++i) {
|
||||
workers_data_ptrs = (WorkerData**)sgen_alloc_internal_dynamic (context->workers_num * sizeof (WorkerData*), INTERNAL_MEM_WORKER_DATA, TRUE);
|
||||
for (i = 0; i < context->workers_num; ++i) {
|
||||
workers_data_ptrs [i] = &context->workers_data [i];
|
||||
context->workers_data [i].context = context;
|
||||
}
|
||||
|
||||
context->thread_pool_context = sgen_thread_pool_create_context (num_workers, thread_pool_init_func, marker_idle_func, continue_idle_func, should_work_func, (void**)workers_data_ptrs);
|
||||
context->thread_pool_context = sgen_thread_pool_create_context (context->workers_num, thread_pool_init_func, marker_idle_func, continue_idle_func, should_work_func, (void**)workers_data_ptrs);
|
||||
|
||||
if (!stat_inited) {
|
||||
mono_counters_register ("# workers finished", MONO_COUNTER_GC | MONO_COUNTER_ULONG, &stat_workers_num_finished);
|
||||
|
||||
@@ -531,7 +531,8 @@ TESTS_CS_SRC= \
|
||||
bug-59281.cs \
|
||||
init_array_with_lazy_type.cs \
|
||||
weak-fields.cs \
|
||||
threads-leak.cs
|
||||
threads-leak.cs \
|
||||
nested_type_visibility.cs
|
||||
|
||||
if AMD64
|
||||
TESTS_CS_SRC += async-exc-compilation.cs finally_guard.cs finally_block_ending_in_dead_bb.cs
|
||||
@@ -907,6 +908,9 @@ PROFILE_DISABLED_TESTS += \
|
||||
assemblyresolve_event3.exe \
|
||||
appdomain-serialize-exception.exe
|
||||
|
||||
PROFILE_DISABLED_TESTS += \
|
||||
delegate15.exe
|
||||
|
||||
# https://bugzilla.xamarin.com/show_bug.cgi?id=60973
|
||||
PROFILE_DISABLED_TESTS += \
|
||||
weak-fields.exe
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
namespace ConsoleApplication1
|
||||
{
|
||||
public abstract class SuperClass
|
||||
{
|
||||
protected abstract class SuperInnerAbstractClass
|
||||
{
|
||||
protected class SuperInnerInnerClass
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class ChildClass : SuperClass
|
||||
{
|
||||
private class ChildInnerClass : SuperInnerAbstractClass
|
||||
{
|
||||
private readonly SuperInnerInnerClass s_class = new SuperInnerInnerClass();
|
||||
}
|
||||
|
||||
public ChildClass()
|
||||
{
|
||||
var childInnerClass = new ChildInnerClass();
|
||||
}
|
||||
}
|
||||
|
||||
internal class Program
|
||||
{
|
||||
public static int Main(string[] args)
|
||||
{
|
||||
new ChildClass();
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,6 +48,8 @@ monoutils_sources = \
|
||||
mono-log-posix.c \
|
||||
mono-log-android.c \
|
||||
mono-log-darwin.c \
|
||||
mono-merp.c \
|
||||
mono-merp.h \
|
||||
mono-internal-hash.c \
|
||||
mono-internal-hash.h \
|
||||
mono-io-portability.c \
|
||||
|
||||
@@ -0,0 +1,500 @@
|
||||
/**
|
||||
* \file
|
||||
* Support for interop with the Microsoft Error Reporting tool
|
||||
*
|
||||
* Author:
|
||||
* Alexander Kyte (alkyte@microsoft.com)
|
||||
*
|
||||
* (C) 2018 Microsoft, Inc.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <glib.h>
|
||||
|
||||
#ifdef TARGET_OSX
|
||||
#include "mono-merp.h"
|
||||
|
||||
#include <unistd.h>
|
||||
#include <spawn.h>
|
||||
|
||||
// OSX OS stuff now, for merpGUI interop
|
||||
#include <mach/mach.h>
|
||||
#include <mach/task_info.h>
|
||||
#include <mach/mach_types.h>
|
||||
#include <mach/mach_traps.h>
|
||||
#include <servers/bootstrap.h>
|
||||
|
||||
typedef enum {
|
||||
MerpArchInvalid = 0,
|
||||
|
||||
MerpArchx86_64 = 1,
|
||||
MerpArchx86 = 2,
|
||||
MerpArchPPC = 3,
|
||||
MerpArchPPC64 = 4
|
||||
} MerpArch;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
MERP_EXC_NONE = 0,
|
||||
|
||||
MERP_EXC_FORCE_QUIT = 1,
|
||||
MERP_EXC_SIGSEGV = 2,
|
||||
MERP_EXC_SIGABRT = 3,
|
||||
MERP_EXC_SIGSYS = 4,
|
||||
MERP_EXC_SIGILL = 5,
|
||||
MERP_EXC_SIGBUS = 6,
|
||||
MERP_EXC_SIGFPE = 7 ,
|
||||
MERP_EXC_SIGTRAP = 8,
|
||||
MERP_EXC_SIGKILL = 9,
|
||||
MERP_EXC_HANG = 10
|
||||
} MERPExcType;
|
||||
|
||||
typedef struct {
|
||||
pid_t pidArg; // Process ID of crashed app (required for crash log generation)
|
||||
MerpArch archArg; // Arch, MacOS only, bails out if not found also required for bucketization. (required)
|
||||
uintptr_t capabilitiesArg; // App capabilities (optional) i.e. recover files, etc.
|
||||
uintptr_t threadArg; // Stack Pointer of crashing thread. (required for crash log generation) Used for identifying crashing thread on crawl back when generating crashreport.txt
|
||||
uintptr_t timeArg; // Total runtime (optional)
|
||||
|
||||
MERPExcType exceptionArg; // Exception type (refer to merpcommon.h and mach/exception_types.h for more info (optional)
|
||||
|
||||
const char *bundleIDArg; // App Bundle ID (required for bucketization)
|
||||
const char *signatureArg; // App Bundle Signature (required)
|
||||
|
||||
const char *versionArg; // App Version (required for bucketization)
|
||||
const char *devRegionArg; // App region (optional)
|
||||
const char *uiLidArg; // Application LCID aka Language ID (optional for bucketization)
|
||||
|
||||
const char *serviceNameArg; // This is the Bootstrap service name that MERP GUI will create to receive mach_task_self on a port created. Bails out if MERP GUI fails to receive mach_task_self from the crashed app. (Required for crash log generation)
|
||||
|
||||
const char *appLoggerName; // App loger name (optional)
|
||||
const char *appLogSessionUUID; // App Session ID (optional but very useful)
|
||||
gboolean isOfficeApplication; // Is office application (1 = True 0 = false). Needs to be 1 to continue. (Required by design)
|
||||
gboolean isObjCException; // Is objectiveC Exception. (optional for crash log generation)
|
||||
size_t memVirt; // Virtual memory (pagination) at the time of crash (optional)
|
||||
size_t memRes; // Physical memory allocated at the time of the crash (optional)
|
||||
const char *treSessionID; // Rules engine session ID (optional)
|
||||
const char *exceptionCodeArg; // Exception code (optional)
|
||||
const char *exceptionAddressArg; // Exception address (optional)
|
||||
gboolean isAppRegisteredWithMAU; // Was this app installed with Microsoft Autoupdate (1 = True 0 = false)
|
||||
} MERPStruct;
|
||||
|
||||
typedef struct {
|
||||
gboolean enable_merp;
|
||||
|
||||
const char *appBundleID;
|
||||
const char *appSignature;
|
||||
const char *appVersion;
|
||||
const char *merpGUIPath;
|
||||
gboolean log;
|
||||
} MerpOptions;
|
||||
|
||||
MerpOptions config;
|
||||
|
||||
static void
|
||||
append_merp_arch (GString *output, MerpArch arch)
|
||||
{
|
||||
switch (arch) {
|
||||
case MerpArchx86_64:
|
||||
g_string_append_printf (output, "01000007\n");
|
||||
break;
|
||||
case MerpArchx86:
|
||||
g_string_append_printf (output, "00000007\n");
|
||||
break;
|
||||
case MerpArchPPC:
|
||||
g_string_append_printf (output, "00000012\n");
|
||||
break;
|
||||
case MerpArchPPC64:
|
||||
g_string_append_printf (output, "01000012\n");
|
||||
break;
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
}
|
||||
}
|
||||
|
||||
static MerpArch
|
||||
get_merp_arch () {
|
||||
#ifdef TARGET_X86
|
||||
return MerpArchx86;
|
||||
#elif defined(TARGET_AMD64)
|
||||
return MerpArchx86_64;
|
||||
#elif defined(TARGET_POWERPC)
|
||||
return MerpArchPPC;
|
||||
#elif defined(TARGET_POWERPC64)
|
||||
return MerpArchPPC64;
|
||||
#else
|
||||
g_assert_not_reached ();
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
append_merp_exctype (GString *output, MERPExcType exc)
|
||||
{
|
||||
switch (exc) {
|
||||
case MERP_EXC_FORCE_QUIT:
|
||||
g_string_append_printf (output, "10000000\n");
|
||||
break;
|
||||
case MERP_EXC_SIGSEGV:
|
||||
g_string_append_printf (output, "20000000\n");
|
||||
break;
|
||||
case MERP_EXC_SIGABRT:
|
||||
g_string_append_printf (output, "30000000\n");
|
||||
break;
|
||||
case MERP_EXC_SIGSYS:
|
||||
g_string_append_printf (output, "40000000\n");
|
||||
break;
|
||||
case MERP_EXC_SIGILL:
|
||||
g_string_append_printf (output, "50000000\n");
|
||||
break;
|
||||
case MERP_EXC_SIGBUS:
|
||||
g_string_append_printf (output, "60000000\n");
|
||||
break;
|
||||
case MERP_EXC_SIGFPE:
|
||||
g_string_append_printf (output, "70000000\n");
|
||||
break;
|
||||
case MERP_EXC_SIGTRAP:
|
||||
g_string_append_printf (output, "80000000\n");
|
||||
break;
|
||||
case MERP_EXC_SIGKILL:
|
||||
g_string_append_printf (output, "90000000\n");
|
||||
break;
|
||||
case MERP_EXC_HANG:
|
||||
g_string_append_printf (output, "02000000\n");
|
||||
break;
|
||||
case MERP_EXC_NONE:
|
||||
// Exception type is optional
|
||||
g_string_append_printf (output, "\n");
|
||||
break;
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
}
|
||||
}
|
||||
|
||||
static MERPExcType
|
||||
parse_exception_type (const char *signal)
|
||||
{
|
||||
if (!strcmp (signal, "SIGSEGV"))
|
||||
return MERP_EXC_SIGSEGV;
|
||||
|
||||
if (!strcmp (signal, "SIGFPE"))
|
||||
return MERP_EXC_SIGFPE;
|
||||
|
||||
if (!strcmp (signal, "SIGILL"))
|
||||
return MERP_EXC_SIGILL;
|
||||
|
||||
if (!strcmp (signal, "SIGABRT"))
|
||||
return MERP_EXC_SIGABRT;
|
||||
|
||||
// FIXME: There are no other such signal
|
||||
// strings passed to mono_handle_native_crash at the
|
||||
// time of writing this
|
||||
g_error ("Merp doesn't know how to handle %s\n", signal);
|
||||
}
|
||||
|
||||
static void
|
||||
print_string_or_blank (GString *output, const char *maybeString)
|
||||
{
|
||||
if (maybeString)
|
||||
g_string_append_printf (output, "%s", maybeString);
|
||||
g_string_append_printf (output, "\n");
|
||||
}
|
||||
|
||||
static void
|
||||
print_pointer_param (GString *output, intptr_t ptr)
|
||||
{
|
||||
// The format is arch-specific
|
||||
#if defined(TARGET_AMD64)
|
||||
g_string_append_printf (output, "%016llx\n", ptr);
|
||||
#elif defined(TARGET_X86)
|
||||
g_string_append_printf (output, "%08x\n", ptr);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
print_memory_fraction (GString *output, size_t mem_bytes)
|
||||
{
|
||||
if (!mem_bytes) {
|
||||
g_string_append_printf (output, "\n");
|
||||
return;
|
||||
}
|
||||
|
||||
mem_bytes >>= 10; // convert from bytes to kb
|
||||
float frac = (float) mem_bytes / 1024.0; // kb to mb
|
||||
|
||||
g_string_append_printf (output, "%f\n", frac);
|
||||
}
|
||||
|
||||
static void
|
||||
mono_encode_merp (GString *output, MERPStruct *merp)
|
||||
{
|
||||
// Format of integers seems to be 8 digits with padding
|
||||
g_assert (merp->pidArg);
|
||||
g_string_append_printf (output, "%.8x\n", merp->pidArg);
|
||||
|
||||
g_assert (merp->archArg);
|
||||
append_merp_arch (output, merp->archArg);
|
||||
|
||||
g_string_append_printf (output, "%.8x\n", merp->capabilitiesArg);
|
||||
print_pointer_param (output, merp->threadArg);
|
||||
print_pointer_param (output, merp->timeArg);
|
||||
|
||||
append_merp_exctype (output, merp->exceptionArg);
|
||||
|
||||
g_assert (merp->bundleIDArg);
|
||||
g_assert (merp->signatureArg);
|
||||
g_assert (merp->versionArg);
|
||||
g_string_append_printf (output, "%s\n%s\n%s\n", merp->bundleIDArg, merp->signatureArg, merp->versionArg);
|
||||
|
||||
print_string_or_blank (output, merp->devRegionArg);
|
||||
print_string_or_blank (output, merp->uiLidArg);
|
||||
|
||||
g_assert (merp->serviceNameArg);
|
||||
g_string_append_printf (output, "%s\n", merp->serviceNameArg);
|
||||
|
||||
print_string_or_blank (output, merp->appLoggerName);
|
||||
print_string_or_blank (output, merp->appLogSessionUUID);
|
||||
|
||||
g_string_append_printf (output, "%d\n", merp->isOfficeApplication ? 1 : 0);
|
||||
|
||||
print_string_or_blank (output, merp->isObjCException ? "1" : NULL);
|
||||
|
||||
print_memory_fraction (output, merp->memRes);
|
||||
print_memory_fraction (output, merp->memVirt);
|
||||
|
||||
print_string_or_blank (output, merp->treSessionID);
|
||||
print_string_or_blank (output, merp->exceptionCodeArg);
|
||||
print_string_or_blank (output, merp->exceptionAddressArg);
|
||||
print_string_or_blank (output, merp->isAppRegisteredWithMAU ? "1" : "0");
|
||||
}
|
||||
|
||||
// Darwin-only for now
|
||||
static void
|
||||
mono_arch_memory_info (size_t *resOut, size_t *vmOut)
|
||||
{
|
||||
struct task_basic_info t_info = {0};
|
||||
mach_msg_type_number_t t_info_count = TASK_BASIC_INFO_COUNT;
|
||||
task_name_t task = mach_task_self();
|
||||
|
||||
task_info(task, TASK_BASIC_INFO, (task_info_t) &t_info, &t_info_count);
|
||||
|
||||
*resOut = (size_t) t_info.resident_size;
|
||||
*vmOut = (size_t) t_info.virtual_size;
|
||||
}
|
||||
|
||||
static void
|
||||
write_file (GString *str, const char *fileName)
|
||||
{
|
||||
FILE *outfile = fopen (fileName, "w");
|
||||
if (!outfile)
|
||||
g_error ("Could not create file %s\n", fileName);
|
||||
fwrite (str->str, sizeof (gchar), str->len, outfile);
|
||||
fclose (outfile);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* This struct is the wire protocol between MERP
|
||||
* and mono
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
mach_msg_header_t head;
|
||||
|
||||
/* start of the merp-specific data */
|
||||
mach_msg_body_t msgh_body;
|
||||
mach_msg_port_descriptor_t task;
|
||||
/* end of the merp-specific data */
|
||||
|
||||
} MerpRequest;
|
||||
|
||||
static void
|
||||
send_mach_message (mach_port_t *mach_port) {
|
||||
task_name_t task = mach_task_self();
|
||||
|
||||
// Setup request
|
||||
MerpRequest req;
|
||||
req.head.msgh_bits = MACH_MSGH_BITS_COMPLEX| MACH_MSGH_BITS(19, 0);
|
||||
req.task.name = task;
|
||||
req.task.disposition = 19;
|
||||
req.task.type = MACH_MSG_PORT_DESCRIPTOR;
|
||||
|
||||
/* msgh_size passed as argument */
|
||||
req.head.msgh_remote_port = *mach_port;
|
||||
req.head.msgh_local_port = MACH_PORT_NULL;
|
||||
req.head.msgh_id = 400;
|
||||
|
||||
req.msgh_body.msgh_descriptor_count = 1;
|
||||
|
||||
// Send port to merp GUI
|
||||
if (config.log)
|
||||
fprintf (stderr, "Sending message to MERP\n");
|
||||
mach_msg_return_t res = mach_msg (&req.head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, (mach_msg_size_t)sizeof(MerpRequest), 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
|
||||
g_assert (res == KERN_SUCCESS);
|
||||
if (config.log)
|
||||
fprintf (stderr, "Successfully sent message to MERP\n");
|
||||
}
|
||||
|
||||
static void
|
||||
connect_to_merp (const char *serviceName, mach_port_t *merp_port) {
|
||||
// // Create process to launch merp gui application
|
||||
const char *argvOpen[] = {"/usr/bin/open", "-a", config.merpGUIPath, NULL};
|
||||
int status = posix_spawn(NULL, "/usr/bin/open", NULL, NULL, (char *const*)(argvOpen), NULL);
|
||||
|
||||
// // FIXME error handling
|
||||
g_assert (status == 0);
|
||||
|
||||
// Register our service name with this task
|
||||
// BOOTSTRAP_UNKNOWN_SERVICE is returned while the service doesn't exist.
|
||||
// We rely on MERP to make the service with serviceName for us
|
||||
kern_return_t kernErr = bootstrap_look_up(bootstrap_port, serviceName, merp_port);
|
||||
while (true) {
|
||||
for (int i = 0; BOOTSTRAP_UNKNOWN_SERVICE == kernErr && i < 5000; i++)
|
||||
kernErr = bootstrap_look_up(bootstrap_port, serviceName, merp_port);
|
||||
|
||||
if (kernErr != BOOTSTRAP_UNKNOWN_SERVICE)
|
||||
break;
|
||||
|
||||
if (config.log)
|
||||
fprintf (stderr, "Merp: Service not registered with name %s, resetting counter after 10s sleep\n", serviceName);
|
||||
sleep(10);
|
||||
}
|
||||
|
||||
/*// FIXME error handling*/
|
||||
g_assert (KERN_SUCCESS == kernErr);
|
||||
}
|
||||
|
||||
static void
|
||||
mono_merp_send (GString *str, const char *serviceName)
|
||||
{
|
||||
// Write struct to magic file location
|
||||
// This registers our mach service so we can connect
|
||||
// to the merp process
|
||||
const char *home = g_get_home_dir ();
|
||||
char *merpParamPath = g_strdup_printf ("%s/Library/Group Containers/UBF8T346G9.ms/MERP.Params.txt", home);
|
||||
write_file (str, merpParamPath);
|
||||
g_free (merpParamPath);
|
||||
|
||||
mach_port_t merpPort = MACH_PORT_NULL;
|
||||
|
||||
// Start merpGui application
|
||||
// Assign to merpPort the port that merpGui opens
|
||||
// Connecting to the service with name serviceName
|
||||
// that merpGUI starts
|
||||
connect_to_merp (serviceName, &merpPort);
|
||||
|
||||
// Send this mach task to MERP over the port
|
||||
send_mach_message (&merpPort);
|
||||
|
||||
// After we resume from the suspend, we are done
|
||||
// We're spinning down the process shortly.
|
||||
// This thread exits, and the crashing thread's
|
||||
// waitpid on this thread ends.
|
||||
return;
|
||||
}
|
||||
|
||||
static void
|
||||
mono_init_merp (const char *serviceName, const char *signal, pid_t crashed_pid, intptr_t thread_pointer, MERPStruct *merp)
|
||||
{
|
||||
g_assert (mono_merp_enabled ());
|
||||
|
||||
merp->pidArg = crashed_pid;
|
||||
merp->archArg = get_merp_arch ();
|
||||
merp->capabilitiesArg = 0x0;
|
||||
|
||||
merp->threadArg = thread_pointer;
|
||||
|
||||
// FIXME: time the runtime?
|
||||
merp->timeArg = 0x0;
|
||||
|
||||
merp->exceptionArg = parse_exception_type (signal);
|
||||
|
||||
// If these aren't set, icall wasn't made
|
||||
// don't do merp? / don't set the variable to use merp;
|
||||
merp->bundleIDArg = config.appBundleID;
|
||||
merp->signatureArg = config.appSignature;
|
||||
merp->versionArg = config.appVersion;
|
||||
|
||||
// FIXME: Do we want these?
|
||||
merp->devRegionArg = NULL;
|
||||
merp->uiLidArg = NULL;
|
||||
|
||||
merp->serviceNameArg = serviceName;
|
||||
|
||||
// FIXME: Do we want these?
|
||||
merp->appLoggerName = NULL;
|
||||
merp->appLogSessionUUID = NULL;
|
||||
|
||||
// Should be set for our usage as per document
|
||||
merp->isOfficeApplication = TRUE;
|
||||
merp->isObjCException = FALSE;
|
||||
|
||||
mono_arch_memory_info (&merp->memRes, &merp->memVirt);
|
||||
|
||||
// No sessions right now
|
||||
merp->treSessionID = NULL;
|
||||
merp->exceptionCodeArg = NULL;
|
||||
merp->exceptionAddressArg = NULL;
|
||||
|
||||
// Not certain? Maybe expose to config options
|
||||
merp->isAppRegisteredWithMAU = TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
mono_merp_invoke (pid_t crashed_pid, intptr_t thread_pointer, const char *signal)
|
||||
{
|
||||
// This unique service name is used to communicate with merp over mach service ports
|
||||
char *serviceName = g_strdup_printf ("com.mono.merp.%.8x", crashed_pid);
|
||||
|
||||
MERPStruct merp = {0};
|
||||
mono_init_merp (serviceName, signal, crashed_pid, thread_pointer, &merp);
|
||||
|
||||
GString *output = g_string_new ("");
|
||||
mono_encode_merp (output, &merp);
|
||||
|
||||
if (config.log)
|
||||
fprintf (stderr, "Results: \n(%s)\n", output->str);
|
||||
|
||||
// We send the merp over the port
|
||||
mono_merp_send (output, serviceName);
|
||||
|
||||
g_string_free (output, TRUE);
|
||||
g_free (serviceName);
|
||||
}
|
||||
|
||||
void
|
||||
mono_merp_disable (void)
|
||||
{
|
||||
if (!config.enable_merp)
|
||||
return;
|
||||
|
||||
g_free (config.appBundleID);
|
||||
g_free (config.appSignature);
|
||||
g_free (config.appVersion);
|
||||
g_free (config.merpGUIPath);
|
||||
memset ((void *)&config, 0, sizeof (MerpOptions));
|
||||
}
|
||||
|
||||
void
|
||||
mono_merp_enable (char *appBundleID, char *appSignature, char *appVersion, char *merpGUIPath)
|
||||
{
|
||||
g_assert (!config.enable_merp);
|
||||
|
||||
config.appBundleID = g_strdup (appBundleID);
|
||||
config.appSignature = g_strdup (appSignature);
|
||||
config.appVersion = g_strdup (appVersion);
|
||||
config.merpGUIPath = g_strdup (merpGUIPath);
|
||||
|
||||
config.log = g_getenv ("MONO_MERP_VERBOSE") != NULL;
|
||||
|
||||
config.enable_merp = TRUE;
|
||||
}
|
||||
|
||||
gboolean
|
||||
mono_merp_enabled (void)
|
||||
{
|
||||
return config.enable_merp;
|
||||
}
|
||||
|
||||
#endif // TARGET_OSX
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
/**
|
||||
* \file
|
||||
* Support for interop with the Microsoft Error Reporting tool (header)
|
||||
*
|
||||
* Author:
|
||||
* Alexander Kyte (alkyte@microsoft.com)
|
||||
*
|
||||
* (C) 2018 Microsoft, Inc.
|
||||
*
|
||||
*/
|
||||
#ifndef __MONO_UTILS_MERP__
|
||||
#define __MONO_UTILS_MERP__
|
||||
|
||||
#include <config.h>
|
||||
#include <glib.h>
|
||||
|
||||
#ifdef TARGET_OSX
|
||||
|
||||
/**
|
||||
* Unregister the MERP-based handler
|
||||
*/
|
||||
void mono_merp_disable (void);
|
||||
|
||||
/**
|
||||
*
|
||||
* Enable the MERP-based handler and set application-specific information
|
||||
*
|
||||
* See MERP documentation for information on the bundle ID, signature, and version fields
|
||||
*/
|
||||
void
|
||||
mono_merp_enable (char *appBundleID, char *appSignature, char *appVersion, char *merpGUIPath);
|
||||
|
||||
/**
|
||||
* Whether the MERP-based handler is registered
|
||||
*/
|
||||
gboolean mono_merp_enabled (void);
|
||||
|
||||
/**
|
||||
* Create the MERP config file and invoke the merp agent
|
||||
*
|
||||
* \arg crashed_pid the PID of the thread that encountered the native fault
|
||||
* \arg thread_pointer the address of the stack pointer when the native fault occurred
|
||||
*
|
||||
* This either returns after the MERP handler has successfully uploaded crashed_pid's
|
||||
* crash dump (leaving the caller to call exit), or terminates the runtime
|
||||
* when the registered telemetry application does not respond.
|
||||
*/
|
||||
void mono_merp_invoke (pid_t crashed_pid, intptr_t thread_pointer, const char *signal);
|
||||
|
||||
|
||||
#endif // TARGET_OSX
|
||||
|
||||
#endif // MONO_UTILS_MERP
|
||||
+26
-10
@@ -48,7 +48,7 @@ typedef unsigned __int64 uint64_t;
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __GNUC__
|
||||
#if defined (__clang__) || defined (__GNUC__)
|
||||
#define MONO_API_EXPORT __attribute__ ((__visibility__ ("default")))
|
||||
#else
|
||||
#define MONO_API_EXPORT
|
||||
@@ -119,24 +119,41 @@ mono_set_allocator_vtable (MonoAllocatorVTable* vtable);
|
||||
#define MONO_RT_CENTRINEL_SUPPRESS
|
||||
#endif
|
||||
|
||||
#if defined (__clang__)
|
||||
#if defined (__clang__) || defined (__GNUC__)
|
||||
// attribute(deprecated(message)) was introduced in gcc 4.5.
|
||||
// attribute(deprecated)) was introduced in gcc 4.0.
|
||||
// Compare: https://gcc.gnu.org/onlinedocs/gcc-3.4.6/gcc/Function-Attributes.html
|
||||
// https://gcc.gnu.org/onlinedocs/gcc-4.4.0/gcc/Function-Attributes.html
|
||||
// https://gcc.gnu.org/onlinedocs/gcc-4.5.0/gcc/Function-Attributes.html
|
||||
#if defined (__clang__) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
|
||||
#define MONO_RT_EXTERNAL_ONLY \
|
||||
__attribute__ ((__unavailable__ ("The mono runtime must not call this function"))) \
|
||||
MONO_RT_CENTRINEL_SUPPRESS
|
||||
#elif defined (__GNUC__)
|
||||
#define MONO_RT_EXTERNAL_ONLY \
|
||||
__attribute__ ((__error__ ("The mono runtime must not call this function"))) \
|
||||
__attribute__ ((__deprecated__ ("The mono runtime must not call this function."))) \
|
||||
MONO_RT_CENTRINEL_SUPPRESS
|
||||
#elif __GNUC__ >= 4
|
||||
#define MONO_RT_EXTERNAL_ONLY __attribute__ ((__deprecated__)) MONO_RT_CENTRINEL_SUPPRESS
|
||||
#else
|
||||
#define MONO_RT_EXTERNAL_ONLY MONO_RT_CENTRINEL_SUPPRESS
|
||||
#endif /* __clang__ */
|
||||
#endif
|
||||
|
||||
#if defined (__clang__) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2)
|
||||
// Pragmas for controlling diagnostics appear to be from gcc 4.2.
|
||||
// This is used in place of configure gcc -Werror=deprecated-declarations:
|
||||
// 1. To be portable across build systems.
|
||||
// 2. configure is very sensitive to compiler flags; they break autoconf's probes.
|
||||
// Though #2 can be mitigated by being late in configure.
|
||||
#pragma GCC diagnostic error "-Wdeprecated-declarations"
|
||||
#endif
|
||||
|
||||
#else
|
||||
#define MONO_RT_EXTERNAL_ONLY MONO_RT_CENTRINEL_SUPPRESS
|
||||
#endif // clang or gcc
|
||||
|
||||
#else
|
||||
#define MONO_RT_EXTERNAL_ONLY
|
||||
#define MONO_RT_MANAGED_ATTR
|
||||
#endif /* MONO_INSIDE_RUNTIME */
|
||||
|
||||
#ifdef __GNUC__
|
||||
#if defined (__clang__) || defined (__GNUC__)
|
||||
#define _MONO_DEPRECATED __attribute__ ((__deprecated__))
|
||||
#elif defined (_MSC_VER)
|
||||
#define _MONO_DEPRECATED __declspec (deprecated)
|
||||
@@ -149,4 +166,3 @@ mono_set_allocator_vtable (MonoAllocatorVTable* vtable);
|
||||
MONO_END_DECLS
|
||||
|
||||
#endif /* __MONO_PUBLIB_H__ */
|
||||
|
||||
@@ -326,7 +326,7 @@ typedef struct ucontext {
|
||||
#endif
|
||||
|
||||
#if defined(__linux__)
|
||||
typedef struct ucontext os_ucontext;
|
||||
typedef ucontext_t os_ucontext;
|
||||
|
||||
#ifdef __mono_ppc64__
|
||||
#define UCONTEXT_REG_Rn(ctx, n) (((os_ucontext*)(ctx))->uc_mcontext.gp_regs [(n)])
|
||||
|
||||
@@ -685,6 +685,7 @@ gboolean
|
||||
mono_thread_info_try_get_internal_thread_gchandle (MonoThreadInfo *info, guint32 *gchandle)
|
||||
{
|
||||
g_assert (info);
|
||||
g_assert (mono_thread_info_is_current (info));
|
||||
|
||||
if (info->internal_thread_gchandle == G_MAXUINT32)
|
||||
return FALSE;
|
||||
@@ -697,6 +698,7 @@ void
|
||||
mono_thread_info_set_internal_thread_gchandle (MonoThreadInfo *info, guint32 gchandle)
|
||||
{
|
||||
g_assert (info);
|
||||
g_assert (mono_thread_info_is_current (info));
|
||||
g_assert (gchandle != G_MAXUINT32);
|
||||
info->internal_thread_gchandle = gchandle;
|
||||
}
|
||||
@@ -705,6 +707,7 @@ void
|
||||
mono_thread_info_unset_internal_thread_gchandle (THREAD_INFO_TYPE *info)
|
||||
{
|
||||
g_assert (info);
|
||||
g_assert (mono_thread_info_is_current (info));
|
||||
info->internal_thread_gchandle = G_MAXUINT32;
|
||||
}
|
||||
|
||||
@@ -1690,3 +1693,24 @@ mono_threads_join_unlock (void)
|
||||
mono_os_mutex_unlock (&join_mutex);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
gboolean
|
||||
mono_thread_info_set_tools_data (void *data)
|
||||
{
|
||||
MonoThreadInfo *info = mono_thread_info_current_unchecked ();
|
||||
if (!info)
|
||||
return FALSE;
|
||||
if (info->tools_data)
|
||||
return FALSE;
|
||||
info->tools_data = data;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void*
|
||||
mono_thread_info_get_tools_data (void)
|
||||
{
|
||||
MonoThreadInfo *info = mono_thread_info_current_unchecked ();
|
||||
|
||||
return info ? info->tools_data : NULL;
|
||||
}
|
||||
@@ -237,6 +237,12 @@ typedef struct {
|
||||
gint32 thread_wait_info;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* This is where we store tools tls data so it follows our lifecycle and doesn't depends on posix tls cleanup ordering
|
||||
*
|
||||
* TODO support multiple values by multiple tools
|
||||
*/
|
||||
void *tools_data;
|
||||
} MonoThreadInfo;
|
||||
|
||||
typedef struct {
|
||||
@@ -353,6 +359,13 @@ mono_thread_info_is_exiting (void);
|
||||
THREAD_INFO_TYPE *
|
||||
mono_thread_info_current (void);
|
||||
|
||||
MONO_API gboolean
|
||||
mono_thread_info_set_tools_data (void *data);
|
||||
|
||||
MONO_API void*
|
||||
mono_thread_info_get_tools_data (void);
|
||||
|
||||
|
||||
THREAD_INFO_TYPE*
|
||||
mono_thread_info_current_unchecked (void);
|
||||
|
||||
|
||||
+75
-8
@@ -9,16 +9,34 @@
|
||||
#include <config.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
|
||||
#ifdef HAVE_SYS_TIME_H
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
|
||||
#include <utils/mono-time.h>
|
||||
#include <mono/utils/mono-time.h>
|
||||
#include <mono/utils/atomic.h>
|
||||
|
||||
#if HAVE_MACH_ABSOLUTE_TIME
|
||||
#include <mach/mach_time.h>
|
||||
static mach_timebase_info_data_t s_TimebaseInfo;
|
||||
#endif
|
||||
|
||||
#define MTICKS_PER_SEC (10 * 1000 * 1000)
|
||||
|
||||
typedef enum _TimeConversionConstants
|
||||
{
|
||||
tccSecondsToMillieSeconds = 1000, // 10^3
|
||||
tccSecondsToMicroSeconds = 1000000, // 10^6
|
||||
tccSecondsToNanoSeconds = 1000000000, // 10^9
|
||||
tccMillieSecondsToMicroSeconds = 1000, // 10^3
|
||||
tccMillieSecondsToNanoSeconds = 1000000, // 10^6
|
||||
tccMicroSecondsToNanoSeconds = 1000, // 10^3
|
||||
tccSecondsTo100NanoSeconds = 10000000, // 10^7
|
||||
tccMicroSecondsTo100NanoSeconds = 10 // 10^1
|
||||
} TimeConversionConstants;
|
||||
|
||||
gint64
|
||||
mono_msec_ticks (void)
|
||||
{
|
||||
@@ -126,16 +144,65 @@ get_boot_time (void)
|
||||
}
|
||||
|
||||
/* Returns the number of milliseconds from boot time: this should be monotonic */
|
||||
/* Adapted from CoreCLR: https://github.com/dotnet/coreclr/blob/66d2738ea96fcce753dec1370e79a0c78f7b6adb/src/pal/src/misc/time.cpp */
|
||||
gint64
|
||||
mono_msec_boottime (void)
|
||||
{
|
||||
static gint64 boot_time = 0;
|
||||
gint64 now;
|
||||
if (!boot_time)
|
||||
boot_time = get_boot_time ();
|
||||
now = mono_100ns_datetime ();
|
||||
/*printf ("now: %llu (boot: %llu) ticks: %llu\n", (gint64)now, (gint64)boot_time, (gint64)(now - boot_time));*/
|
||||
return (now - boot_time)/10000;
|
||||
gint64 retval = 0;
|
||||
|
||||
/* clock_gettime () is found by configure on Apple builds, but its only present from ios 10, macos 10.12, tvos 10 and watchos 3 */
|
||||
#if (defined(HAVE_CLOCK_MONOTONIC_COARSE) || defined(HAVE_CLOCK_MONOTONIC)) && !(defined(TARGET_IOS) || defined(TARGET_OSX) || defined(TARGET_WATCHOS) || defined(TARGET_TVOS))
|
||||
clockid_t clockType =
|
||||
#if HAVE_CLOCK_MONOTONIC_COARSE
|
||||
CLOCK_MONOTONIC_COARSE; /* good enough resolution, fastest speed */
|
||||
#else
|
||||
CLOCK_MONOTONIC;
|
||||
#endif
|
||||
struct timespec ts;
|
||||
if (clock_gettime (clockType, &ts) != 0) {
|
||||
g_error ("clock_gettime(CLOCK_MONOTONIC*) failed; errno is %d", errno, strerror (errno));
|
||||
goto exit;
|
||||
}
|
||||
retval = (ts.tv_sec * tccSecondsToMillieSeconds) + (ts.tv_nsec / tccMillieSecondsToNanoSeconds);
|
||||
|
||||
#elif HAVE_MACH_ABSOLUTE_TIME
|
||||
static gboolean timebase_inited;
|
||||
|
||||
if (!timebase_inited) {
|
||||
kern_return_t machRet;
|
||||
mach_timebase_info_data_t tmp;
|
||||
machRet = mach_timebase_info (&tmp);
|
||||
g_assert (machRet == KERN_SUCCESS);
|
||||
/* Assume memcpy works correctly if ran concurrently */
|
||||
memcpy (&s_TimebaseInfo, &tmp, sizeof (mach_timebase_info_data_t));
|
||||
mono_memory_barrier ();
|
||||
timebase_inited = TRUE;
|
||||
}
|
||||
retval = (mach_absolute_time () * s_TimebaseInfo.numer / s_TimebaseInfo.denom) / tccMillieSecondsToNanoSeconds;
|
||||
|
||||
#elif HAVE_GETHRTIME
|
||||
retval = (gint64)(gethrtime () / tccMillieSecondsToNanoSeconds);
|
||||
|
||||
#elif HAVE_READ_REAL_TIME
|
||||
timebasestruct_t tb;
|
||||
read_real_time (&tb, TIMEBASE_SZ);
|
||||
if (time_base_to_time (&tb, TIMEBASE_SZ) != 0) {
|
||||
g_error ("time_base_to_time() failed; errno is %d (%s)", errno, strerror (errno));
|
||||
goto exit;
|
||||
}
|
||||
retval = (tb.tb_high * tccSecondsToMillieSeconds) + (tb.tb_low / tccMillieSecondsToNanoSeconds);
|
||||
|
||||
#else
|
||||
struct timeval tv;
|
||||
if (gettimeofday (&tv, NULL) == -1) {
|
||||
g_error ("gettimeofday() failed; errno is %d (%s)", errno, strerror (errno));
|
||||
goto exit;
|
||||
}
|
||||
retval = (tv.tv_sec * tccSecondsToMillieSeconds) + (tv.tv_usec / tccMillieSecondsToMicroSeconds);
|
||||
|
||||
#endif /* HAVE_CLOCK_MONOTONIC */
|
||||
exit:
|
||||
return retval;
|
||||
}
|
||||
|
||||
/* Returns the number of 100ns ticks from unspecified time: this should be monotonic */
|
||||
|
||||
@@ -29,7 +29,7 @@ build()
|
||||
pushd ${REPODIR}
|
||||
report "Building Mono"
|
||||
mkdir -p ${INSTALLDIR}
|
||||
EXTRA_CONF_FLAGS="--prefix=${INSTALLDIR}" CI_TAGS="no-tests" label="w32" scripts/ci/run-jenkins.sh || error "*** Could not run autogen ***"
|
||||
EXTRA_CONF_FLAGS="--prefix=${INSTALLDIR}" CI_TAGS="win-i386,no-tests" scripts/ci/run-jenkins.sh || error "*** Could not run autogen ***"
|
||||
popd
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ build()
|
||||
pushd ${REPODIR}
|
||||
report "Building Mono"
|
||||
mkdir -p ${INSTALLDIR}
|
||||
EXTRA_CONF_FLAGS="--prefix=${INSTALLDIR}" CI_TAGS="no-tests" label="w64" scripts/ci/run-jenkins.sh || error "*** Could not run autogen ***"
|
||||
EXTRA_CONF_FLAGS="--prefix=${INSTALLDIR}" CI_TAGS="win-amd64,no-tests" scripts/ci/run-jenkins.sh || error "*** Could not run autogen ***"
|
||||
popd
|
||||
}
|
||||
|
||||
|
||||
+16
-21
@@ -18,7 +18,7 @@ if [[ ${CI_TAGS} == *'clang-sanitizer'* ]]; then
|
||||
make_timeout=30m
|
||||
fi
|
||||
|
||||
if [[ ${label} == w* ]]; then
|
||||
if [[ ${CI_TAGS} == *'win-'* ]]; then
|
||||
# Passing -ggdb3 on Cygwin breaks linking against libmonosgen-x.y.dll
|
||||
export CFLAGS="$CFLAGS -g -O2"
|
||||
else
|
||||
@@ -35,10 +35,10 @@ if [[ $CI_TAGS == *'retry-flaky-tests'* ]]; then
|
||||
export MONO_FLAKY_TEST_RETRIES=5
|
||||
fi
|
||||
|
||||
if [[ ${label} == 'osx-i386' ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --with-libgdiplus=/Library/Frameworks/Mono.framework/Versions/Current/lib/libgdiplus.dylib --build=i386-apple-darwin11.2.0"; fi
|
||||
if [[ ${label} == 'osx-amd64' ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --with-libgdiplus=/Library/Frameworks/Mono.framework/Versions/Current/lib/libgdiplus.dylib "; fi
|
||||
if [[ ${label} == 'w32' ]]; then PLATFORM=Win32; EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --host=i686-w64-mingw32"; export MONO_EXECUTABLE="${MONO_REPO_ROOT}/msvc/build/sgen/Win32/bin/Release/mono-sgen.exe"; fi
|
||||
if [[ ${label} == 'w64' ]]; then PLATFORM=x64; EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --host=x86_64-w64-mingw32 --disable-boehm"; export MONO_EXECUTABLE="${MONO_REPO_ROOT}/msvc/build/sgen/x64/bin/Release/mono-sgen.exe"; fi
|
||||
if [[ ${CI_TAGS} == *'osx-i386'* ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --with-libgdiplus=/Library/Frameworks/Mono.framework/Versions/Current/lib/libgdiplus.dylib --build=i386-apple-darwin11.2.0"; fi
|
||||
if [[ ${CI_TAGS} == *'osx-amd64'* ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --with-libgdiplus=/Library/Frameworks/Mono.framework/Versions/Current/lib/libgdiplus.dylib "; fi
|
||||
if [[ ${CI_TAGS} == *'win-i386'* ]]; then PLATFORM=Win32; EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --host=i686-w64-mingw32"; export MONO_EXECUTABLE="${MONO_REPO_ROOT}/msvc/build/sgen/Win32/bin/Release/mono-sgen.exe"; fi
|
||||
if [[ ${CI_TAGS} == *'win-amd64'* ]]; then PLATFORM=x64; EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --host=x86_64-w64-mingw32 --disable-boehm"; export MONO_EXECUTABLE="${MONO_REPO_ROOT}/msvc/build/sgen/x64/bin/Release/mono-sgen.exe"; fi
|
||||
|
||||
if [[ ${CI_TAGS} == *'coop-gc'* ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --with-cooperative-gc=yes"; fi
|
||||
|
||||
@@ -57,19 +57,13 @@ elif [[ ${CI_TAGS} == *'winaot'* ]]; then EXTRA_CONF_FLAGS="${EXTRA_
|
||||
elif [[ ${CI_TAGS} == *'aot'* ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --with-runtime_preset=aot";
|
||||
elif [[ ${CI_TAGS} == *'bitcode'* ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --with-runtime_preset=bitcode";
|
||||
elif [[ ${CI_TAGS} == *'acceptance-tests'* ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --prefix=${MONO_REPO_ROOT}/tmp/mono-acceptance-tests --with-sgen-default-concurrent=yes";
|
||||
elif [[ ${label} != w* ]] && [[ ${label} != 'debian-8-ppc64el' ]] && [[ ${label} != 'centos-s390x' ]] && [[ ${CI_TAGS} != *'monolite'* ]];
|
||||
then
|
||||
# only enable the concurrent collector by default on main unix archs
|
||||
EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --with-sgen-default-concurrent=yes"
|
||||
|
||||
if [[ ${label} == 'ubuntu-1404-amd64' ]]; then
|
||||
# only enable build of the additional profiles on one architecture to save time
|
||||
EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --with-runtime_preset=all"
|
||||
# when building profiles like monotouch/monodroid which don't build System.Drawing.dll in the Mono repo we need
|
||||
# to build the facades against _something_ to satisfy the typeforwards. In CI we can cheat a little and pass
|
||||
# them System.Drawing.dll from the 'build' profile since we don't test those profiles here (we just ensure they compile).
|
||||
export EXTERNAL_FACADE_DRAWING_REFERENCE=${MONO_REPO_ROOT}/mcs/class/lib/build/System.Drawing.dll
|
||||
fi
|
||||
elif [[ ${CI_TAGS} == *'all-profiles'* ]]; then
|
||||
# only enable build of the additional profiles on one config to save time
|
||||
EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --with-runtime_preset=all"
|
||||
# when building profiles like monotouch/monodroid which don't build System.Drawing.dll in the Mono repo we need
|
||||
# to build the facades against _something_ to satisfy the typeforwards. In CI we can cheat a little and pass
|
||||
# them System.Drawing.dll from the 'build' profile since we don't test those profiles here (we just ensure they compile).
|
||||
export EXTERNAL_FACADE_DRAWING_REFERENCE=${MONO_REPO_ROOT}/mcs/class/lib/build/System.Drawing.dll
|
||||
fi
|
||||
|
||||
if [ -x "/usr/bin/dpkg-architecture" ];
|
||||
@@ -79,16 +73,17 @@ if [ -x "/usr/bin/dpkg-architecture" ];
|
||||
mkdir -p ~/.config/.mono/
|
||||
wget -qO- https://download.mono-project.com/test/new-certs.tgz| tar zx -C ~/.config/.mono/
|
||||
fi
|
||||
|
||||
if [[ ${CI_TAGS} != *'mac-sdk'* ]]; # Mac SDK builds Mono itself
|
||||
then
|
||||
${TESTCMD} --label=configure --timeout=60m --fatal ./autogen.sh $EXTRA_CONF_FLAGS
|
||||
fi
|
||||
if [[ ${label} == 'w32' ]];
|
||||
if [[ ${CI_TAGS} == *'win-i386'* ]];
|
||||
then
|
||||
# only build boehm on w32 (only windows platform supporting boehm).
|
||||
${TESTCMD} --label=make-msvc --timeout=60m --fatal /cygdrive/c/Program\ Files\ \(x86\)/MSBuild/14.0/Bin/MSBuild.exe /p:PlatformToolset=v140 /p:Platform=${PLATFORM} /p:Configuration=Release /p:MONO_TARGET_GC=boehm msvc/mono.sln
|
||||
fi
|
||||
if [[ ${label} == w* ]];
|
||||
if [[ ${CI_TAGS} == *'win-'* ]];
|
||||
then
|
||||
${TESTCMD} --label=make-msvc-sgen --timeout=60m --fatal /cygdrive/c/Program\ Files\ \(x86\)/MSBuild/14.0/Bin/MSBuild.exe /p:PlatformToolset=v140 /p:Platform=${PLATFORM} /p:Configuration=Release /p:MONO_TARGET_GC=sgen msvc/mono.sln
|
||||
fi
|
||||
@@ -104,7 +99,7 @@ fi
|
||||
if [[ ${CI_TAGS} == *'monolite'* ]]; then make get-monolite-latest; fi
|
||||
|
||||
make_parallelism=-j4
|
||||
if [[ ${label} == 'debian-8-ppc64el' ]]; then make_parallelism=-j1; fi
|
||||
if [[ ${CI_TAGS} == *'linux-ppc64el'* ]]; then make_parallelism=-j1; fi
|
||||
|
||||
if [[ ${CI_TAGS} != *'mac-sdk'* ]]; # Mac SDK builds Mono itself
|
||||
then
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
${TESTCMD} --label=mini --timeout=5m make -w -C mono/mini -k check check-seq-points EMIT_NUNIT=1
|
||||
if [[ ${label} == w* ]]
|
||||
if [[ ${CI_TAGS} == *'win-'* ]]
|
||||
then ${TESTCMD} --label=aot-test --skip;
|
||||
else ${TESTCMD} --label=aot-test --timeout=30m make -w -C mono/tests -j4 -k test-aot
|
||||
fi
|
||||
@@ -17,15 +17,15 @@ ${TESTCMD} --label=compiler --timeout=30m make -w -C mcs/tests run-test
|
||||
${TESTCMD} --label=compiler-errors --timeout=30m make -w -C mcs/errors run-test
|
||||
${TESTCMD} --label=System-xunit --timeout=5m make -w -C mcs/class/System run-xunit-test
|
||||
${TESTCMD} --label=System --timeout=10m bash -c "export MONO_TLS_PROVIDER=legacy && make -w -C mcs/class/System run-test"
|
||||
if [[ ${label} == osx-* ]]; then ${TESTCMD} --label=System-btls --timeout=10m bash -c "export MONO_TLS_PROVIDER=btls && make -w -C mcs/class/System run-test"; fi
|
||||
if [[ ${CI_TAGS} == *'osx-'* ]]; then ${TESTCMD} --label=System-btls --timeout=10m bash -c "export MONO_TLS_PROVIDER=btls && make -w -C mcs/class/System run-test"; fi
|
||||
${TESTCMD} --label=System.XML --timeout=5m make -w -C mcs/class/System.XML run-test
|
||||
${TESTCMD} --label=Mono.Security --timeout=5m make -w -C mcs/class/Mono.Security run-test
|
||||
${TESTCMD} --label=System.Security --timeout=5m make -w -C mcs/class/System.Security run-test
|
||||
if [[ ${label} == w* ]]
|
||||
if [[ ${CI_TAGS} == *'win-'* ]]
|
||||
then ${TESTCMD} --label=System.Drawing --skip;
|
||||
else ${TESTCMD} --label=System.Drawing --timeout=5m make -w -C mcs/class/System.Drawing run-test
|
||||
fi
|
||||
if [[ ${label} == osx-* ]] || [[ ${label} == w* ]]
|
||||
if [[ ${CI_TAGS} == *'osx-'* ]] || [[ ${CI_TAGS} == *'win-'* ]]
|
||||
then ${TESTCMD} --label=Windows.Forms --skip;
|
||||
else
|
||||
if xvfb-run -a -- make -C mcs/class/System.Windows.Forms test-simple;
|
||||
@@ -34,7 +34,7 @@ else
|
||||
fi
|
||||
${TESTCMD} --label=System.Data --timeout=5m make -w -C mcs/class/System.Data run-test
|
||||
${TESTCMD} --label=System.Data-xunit --timeout=5m make -w -C mcs/class/System.Data run-xunit-test
|
||||
if [[ ${label} == w* ]]; then ${TESTCMD} --label=Mono.Data.Sqlite --skip; else ${TESTCMD} --label=Mono.Data.Sqlite --timeout=5m make -w -C mcs/class/Mono.Data.Sqlite run-test; fi
|
||||
if [[ ${CI_TAGS} == *'win-'* ]]; then ${TESTCMD} --label=Mono.Data.Sqlite --skip; else ${TESTCMD} --label=Mono.Data.Sqlite --timeout=5m make -w -C mcs/class/Mono.Data.Sqlite run-test; fi
|
||||
${TESTCMD} --label=System.Data.OracleClient --timeout=5m make -w -C mcs/class/System.Data.OracleClient run-test;
|
||||
${TESTCMD} --label=System.Design --timeout=5m make -w -C mcs/class/System.Design run-test;
|
||||
${TESTCMD} --label=Mono.Posix --timeout=5m make -w -C mcs/class/Mono.Posix run-test
|
||||
@@ -103,7 +103,7 @@ ${TESTCMD} --label=Microsoft.Build.Framework-14 --timeout=60m make -w -C mcs/cla
|
||||
${TESTCMD} --label=Microsoft.Build.Tasks-14 --timeout=60m make -w -C mcs/class/Microsoft.Build.Tasks run-test PROFILE=xbuild_14
|
||||
${TESTCMD} --label=Microsoft.Build.Utilities-14 --timeout=60m make -w -C mcs/class/Microsoft.Build.Utilities run-test PROFILE=xbuild_14
|
||||
${TESTCMD} --label=System.IO.Compression --timeout=5m make -w -C mcs/class/System.IO.Compression run-test
|
||||
if [[ ${label} == w* ]]; then ${TESTCMD} --label=symbolicate --skip; else ${TESTCMD} --label=symbolicate --timeout=60m make -w -C mcs/tools/mono-symbolicate check; fi
|
||||
if [[ ${CI_TAGS} == *'win-'* ]]; then ${TESTCMD} --label=symbolicate --skip; else ${TESTCMD} --label=symbolicate --timeout=60m make -w -C mcs/tools/mono-symbolicate check; fi
|
||||
${TESTCMD} --label=monolinker --timeout=10m make -w -C mcs/tools/linker check
|
||||
${TESTCMD} --label=csi --timeout=10m make -w -C mcs/packages run-test
|
||||
|
||||
|
||||
@@ -8,5 +8,5 @@ ${TESTCMD} --label=mixedmode-regression --timeout=10m make -C mono/mini mixedche
|
||||
${TESTCMD} --label=compile-runtime-tests --timeout=40m make -w -C mono/tests -j4 tests
|
||||
${TESTCMD} --label=runtime-interp --timeout=160m make -w -C mono/tests -k testinterp V=1 CI=1 CI_PR=${ghprbPullId}
|
||||
${TESTCMD} --label=corlib --timeout=160m make -w -C mcs/class/corlib run-test V=1
|
||||
if [[ ${label} != 'debian-8-armhf' ]]; then ${TESTCMD} --label=mcs-tests --timeout=160m make -w -C mcs/tests run-test V=1; fi
|
||||
if [[ ${CI_TAGS} != *'linux-armhf'* ]]; then ${TESTCMD} --label=mcs-tests --timeout=160m make -w -C mcs/tests run-test V=1; fi
|
||||
${TESTCMD} --label=Mono.Debugger.Soft --timeout=5m make -w -C mcs/class/Mono.Debugger.Soft run-test V=1
|
||||
@@ -1,4 +1,6 @@
|
||||
TOP=$(realpath $(CURDIR)/../..)
|
||||
-include $(TOP)/sdks/Make.config
|
||||
include $(TOP)/sdks/versions.mk
|
||||
include $(TOP)/sdks/paths.mk
|
||||
ADB = $(SDK_DIR)/platform-tools/adb
|
||||
ANDROID = $(SDK_DIR)/tools/android
|
||||
|
||||
+12
-6
@@ -16,12 +16,18 @@ android-host-Darwin-*/
|
||||
android-host-Linux-*/
|
||||
android-host-mxe-Win32-*/
|
||||
android-host-mxe-Win64-*/
|
||||
ios-target32/
|
||||
ios-target64/
|
||||
ios-cross32/
|
||||
ios-cross64/
|
||||
ios-sim32/
|
||||
ios-sim64/
|
||||
ios-target32-*/
|
||||
ios-target32s-*/
|
||||
ios-target64-*/
|
||||
ios-targettv-*/
|
||||
ios-targetwatch-*/
|
||||
ios-cross32-*/
|
||||
ios-cross64-*/
|
||||
ios-crosswatch-*/
|
||||
ios-sim32-*/
|
||||
ios-sim64-*/
|
||||
ios-simtv-*/
|
||||
ios-simwatch-*/
|
||||
wasm-interp/
|
||||
bcl/
|
||||
|
||||
|
||||
+21
-4
@@ -1,12 +1,22 @@
|
||||
TOP=$(realpath $(CURDIR)/../..)
|
||||
include $(TOP)/sdks/versions.mk
|
||||
include $(TOP)/sdks/paths.mk
|
||||
-include $(TOP)/sdks/Make.config
|
||||
|
||||
MAKEFLAGS += --no-builtin-rules
|
||||
|
||||
CONFIGURATION?=release
|
||||
|
||||
RELEASE=$(if $(filter $(CONFIGURATION),release),true,false)
|
||||
RELEASE=$(if $(filter $(CONFIGURATION),release),1)
|
||||
|
||||
CCACHE:=$(shell which ccache)
|
||||
CCACHE:=$(if $(DISABLE_CCACHE),,$(shell which ccache))
|
||||
|
||||
UNAME=$(shell uname)
|
||||
ifneq ($(UNAME),Darwin)
|
||||
# iOS requires Xcode to be available, and Xcode is only available on macOS
|
||||
DISABLE_IOS=1
|
||||
endif
|
||||
|
||||
include $(TOP)/sdks/versions.mk
|
||||
include $(TOP)/sdks/paths.mk
|
||||
|
||||
#brew's libtool is not compatible with some of the deps needed (I.E. V8) so in those systems we need to explicit add to the path
|
||||
#this is due mono not being compatible with xcode's libtool, which is what's on path by default
|
||||
@@ -17,9 +27,16 @@ endif
|
||||
all: package
|
||||
|
||||
## Common Mono targets
|
||||
|
||||
.PHONY: configure-mono
|
||||
configure-mono: $(TOP)/configure
|
||||
|
||||
$(TOP)/configure: $(TOP)/configure.ac $(TOP)/autogen.sh
|
||||
cd $(TOP) && PATH=$(EXTRA_PATH):$$PATH NOCONFIGURE=1 ./autogen.sh
|
||||
|
||||
$(TOP)/tools/offsets-tool/MonoAotOffsetsDumper.exe: $(wildcard $(TOP)/tools/offsets-tool/*.cs)
|
||||
$(MAKE) -C $(dir $@) MonoAotOffsetsDumper.exe
|
||||
|
||||
TARGETS=
|
||||
|
||||
## MXE targets
|
||||
|
||||
+168
-219
@@ -1,4 +1,93 @@
|
||||
|
||||
include runtime.mk
|
||||
|
||||
ANDROID_URI?=https://dl.google.com/android/repository/
|
||||
ANDROID_TOOLCHAIN_PREFIX?=$(TOP)/sdks/builds/toolchains/android
|
||||
ANDROID_TOOLCHAIN_DIR?=$(TOP)/sdks/builds/toolchains/android
|
||||
ANDROID_TOOLCHAIN_CACHE_DIR?=$(TOP)/sdks/builds/toolchains/android
|
||||
|
||||
ANT_URI?=https://archive.apache.org/dist/ant/binaries/
|
||||
|
||||
$(ANDROID_TOOLCHAIN_CACHE_DIR):
|
||||
mkdir -p $@
|
||||
|
||||
##
|
||||
# Parameters:
|
||||
# $(1): target
|
||||
# $(2): dir
|
||||
# $(3): category
|
||||
# $(4): url prefix
|
||||
define AndroidProvisioningTemplate
|
||||
|
||||
$$(ANDROID_TOOLCHAIN_CACHE_DIR)/$(1).zip: | $$(ANDROID_TOOLCHAIN_CACHE_DIR)
|
||||
wget --no-verbose -O $$@ $(4)$(1).zip
|
||||
|
||||
$$(ANDROID_TOOLCHAIN_DIR)/$(3)$$(if $(2),/$(2))/.stamp-$(1): $$(ANDROID_TOOLCHAIN_CACHE_DIR)/$(1).zip
|
||||
rm -rf $$(ANDROID_TOOLCHAIN_DIR)/$(3)$$(if $(2),/$(2))
|
||||
./unzip-android-archive.sh "$$<" "$$(ANDROID_TOOLCHAIN_DIR)/$(3)$$(if $(2),/$(2))"
|
||||
touch $$@
|
||||
|
||||
.PHONY: provision-android-$(3)-$(1)
|
||||
provision-android-$(3)-$(1): $$(ANDROID_TOOLCHAIN_DIR)/$(3)$$(if $(2),/$(2))/.stamp-$(1)
|
||||
|
||||
.PHONY: provision-android
|
||||
provision-android: provision-android-$(3)-$(1)
|
||||
|
||||
endef
|
||||
|
||||
AndroidNDKProvisioningTemplate=$(call AndroidProvisioningTemplate,$(1),,ndk,$(ANDROID_URI))
|
||||
|
||||
ifeq ($(UNAME),Darwin)
|
||||
$(eval $(call AndroidNDKProvisioningTemplate,android-ndk-$(ANDROID_NDK_VERSION)-darwin-x86_64))
|
||||
else
|
||||
ifeq ($(UNAME),Linux)
|
||||
$(eval $(call AndroidNDKProvisioningTemplate,android-ndk-$(ANDROID_NDK_VERSION)-linux-x86_64))
|
||||
else
|
||||
$(error "Unknown UNAME=$(UNAME)")
|
||||
endif
|
||||
endif
|
||||
|
||||
AndroidSDKProvisioningTemplate=$(call AndroidProvisioningTemplate,$(1),$(2),sdk,$(ANDROID_URI)$(3))
|
||||
|
||||
ifeq ($(UNAME),Darwin)
|
||||
$(eval $(call AndroidSDKProvisioningTemplate,build-tools_r$(ANDROID_BUILD_TOOLS_VERSION)-macosx,build-tools/$(or $(ANDROID_BUILD_TOOLS_DIR),$(ANDROID_BUILD_TOOLS_VERSION))))
|
||||
$(eval $(call AndroidSDKProvisioningTemplate,platform-tools_r27.0.1-darwin,platform-tools))
|
||||
$(eval $(call AndroidSDKProvisioningTemplate,sdk-tools-darwin-4333796,tools))
|
||||
$(eval $(call AndroidSDKProvisioningTemplate,emulator-darwin-4266726,emulator))
|
||||
else
|
||||
ifeq ($(UNAME),Linux)
|
||||
$(eval $(call AndroidSDKProvisioningTemplate,build-tools_r$(ANDROID_BUILD_TOOLS_VERSION)-linux,build-tools/$(or $(ANDROID_BUILD_TOOLS_DIR),$(ANDROID_BUILD_TOOLS_VERSION))))
|
||||
$(eval $(call AndroidSDKProvisioningTemplate,platform-tools_r27.0.1-linux,platform-tools))
|
||||
$(eval $(call AndroidSDKProvisioningTemplate,sdk-tools-linux-4333796,tools))
|
||||
$(eval $(call AndroidSDKProvisioningTemplate,emulator-linux-4266726,emulator))
|
||||
else
|
||||
$(error "Unknown UNAME=$(UNAME)")
|
||||
endif
|
||||
endif
|
||||
|
||||
$(eval $(call AndroidSDKProvisioningTemplate,android-2.3.3_r02-linux,platforms/android-10))
|
||||
$(eval $(call AndroidSDKProvisioningTemplate,android-15_r03,platforms/android-15))
|
||||
$(eval $(call AndroidSDKProvisioningTemplate,android-16_r04,platforms/android-16))
|
||||
$(eval $(call AndroidSDKProvisioningTemplate,android-17_r02,platforms/android-17))
|
||||
$(eval $(call AndroidSDKProvisioningTemplate,android-18_r02,platforms/android-18))
|
||||
$(eval $(call AndroidSDKProvisioningTemplate,android-19_r03,platforms/android-19))
|
||||
$(eval $(call AndroidSDKProvisioningTemplate,android-20_r02,platforms/android-20))
|
||||
$(eval $(call AndroidSDKProvisioningTemplate,android-21_r02,platforms/android-21))
|
||||
$(eval $(call AndroidSDKProvisioningTemplate,android-22_r02,platforms/android-22))
|
||||
$(eval $(call AndroidSDKProvisioningTemplate,platform-23_r03,platforms/android-23))
|
||||
$(eval $(call AndroidSDKProvisioningTemplate,platform-24_r02,platforms/android-24))
|
||||
$(eval $(call AndroidSDKProvisioningTemplate,platform-25_r03,platforms/android-25))
|
||||
$(eval $(call AndroidSDKProvisioningTemplate,platform-26_r01,platforms/android-26))
|
||||
$(eval $(call AndroidSDKProvisioningTemplate,platform-27_r01,platforms/android-27))
|
||||
$(eval $(call AndroidSDKProvisioningTemplate,platform-P_r01,platforms/android-P))
|
||||
$(eval $(call AndroidSDKProvisioningTemplate,docs-24_r01,docs))
|
||||
$(eval $(call AndroidSDKProvisioningTemplate,android_m2repository_r16,extras/android/m2repository))
|
||||
$(eval $(call AndroidSDKProvisioningTemplate,x86-21_r05,system-images/android-21/default/x86,sys-img/android/))
|
||||
|
||||
AndroidAntProvisioningTemplate=$(call AndroidProvisioningTemplate,$(1),,ant,$(ANT_URI))
|
||||
|
||||
$(eval $(call AndroidAntProvisioningTemplate,apache-ant-1.9.9-bin))
|
||||
|
||||
##
|
||||
# Parameters:
|
||||
# $(1): target
|
||||
@@ -7,64 +96,52 @@
|
||||
# $(4): host_triple
|
||||
#
|
||||
# Flags:
|
||||
# android_$(1)_CFLAGS
|
||||
# android_$(1)_CXXFLAGS
|
||||
# android_$(1)_LDFLAGS
|
||||
# android-$(1)_CFLAGS
|
||||
# android-$(1)_CXXFLAGS
|
||||
# android-$(1)_LDFLAGS
|
||||
define AndroidTargetTemplate
|
||||
|
||||
_android_$(1)_AR=$$(TOP)/sdks/builds/toolchains/android-$(1)/bin/$(3)-ar
|
||||
_android_$(1)_AS=$$(TOP)/sdks/builds/toolchains/android-$(1)/bin/$(3)-as
|
||||
_android_$(1)_CC=$$(CCACHE) $$(TOP)/sdks/builds/toolchains/android-$(1)/bin/$(3)-clang
|
||||
_android_$(1)_CXX=$$(CCACHE) $$(TOP)/sdks/builds/toolchains/android-$(1)/bin/$(3)-clang++
|
||||
_android_$(1)_CPP=$$(CCACHE) $$(TOP)/sdks/builds/toolchains/android-$(1)/bin/$(3)-cpp -I$$(TOP)/sdks/builds/toolchains/android-$(1)/usr/include
|
||||
_android_$(1)_CXXCPP=$$(CCACHE) $$(TOP)/sdks/builds/toolchains/android-$(1)/bin/$(3)-cpp -I$$(TOP)/sdks/builds/toolchains/android-$(1)/usr/include
|
||||
_android_$(1)_DLLTOOL=
|
||||
_android_$(1)_LD=$$(TOP)/sdks/builds/toolchains/android-$(1)/bin/$(3)-ld
|
||||
_android_$(1)_OBJDUMP="$$(TOP)/sdks/builds/toolchains/android-$(1)/bin/$(3)-objdump"
|
||||
_android_$(1)_RANLIB=$$(TOP)/sdks/builds/toolchains/android-$(1)/bin/$(3)-ranlib
|
||||
_android_$(1)_STRIP=$$(TOP)/sdks/builds/toolchains/android-$(1)/bin/$(3)-strip
|
||||
_android-$(1)_AR=$$(ANDROID_TOOLCHAIN_PREFIX)/$(1)-clang/bin/$(3)-ar
|
||||
_android-$(1)_AS=$$(ANDROID_TOOLCHAIN_PREFIX)/$(1)-clang/bin/$(3)-as
|
||||
_android-$(1)_CC=$$(CCACHE) $$(ANDROID_TOOLCHAIN_PREFIX)/$(1)-clang/bin/$(3)-clang
|
||||
_android-$(1)_CXX=$$(CCACHE) $$(ANDROID_TOOLCHAIN_PREFIX)/$(1)-clang/bin/$(3)-clang++
|
||||
_android-$(1)_CPP=$$(CCACHE) $$(ANDROID_TOOLCHAIN_PREFIX)/$(1)-clang/bin/$(3)-cpp
|
||||
_android-$(1)_CXXCPP=$$(CCACHE) $$(ANDROID_TOOLCHAIN_PREFIX)/$(1)-clang/bin/$(3)-cpp
|
||||
_android-$(1)_DLLTOOL=
|
||||
_android-$(1)_LD=$$(ANDROID_TOOLCHAIN_PREFIX)/$(1)-clang/bin/$(3)-ld
|
||||
_android-$(1)_OBJDUMP="$$(ANDROID_TOOLCHAIN_PREFIX)/$(1)-clang/bin/$(3)-objdump"
|
||||
_android-$(1)_RANLIB=$$(ANDROID_TOOLCHAIN_PREFIX)/$(1)-clang/bin/$(3)-ranlib
|
||||
_android-$(1)_STRIP=$$(ANDROID_TOOLCHAIN_PREFIX)/$(1)-clang/bin/$(3)-strip
|
||||
|
||||
_android_$(1)_AC_VARS= \
|
||||
_android-$(1)_AC_VARS= \
|
||||
mono_cv_uscore=yes \
|
||||
ac_cv_func_sched_getaffinity=no \
|
||||
ac_cv_func_sched_setaffinity=no
|
||||
|
||||
_android_$(1)_CFLAGS= \
|
||||
$(if $(filter $(RELEASE),true),-O2 -g,-O0 -ggdb3 -fno-omit-frame-pointer) \
|
||||
_android-$(1)_CFLAGS= \
|
||||
-fstack-protector \
|
||||
-DMONODROID=1 \
|
||||
$$(android_$(1)_CFLAGS)
|
||||
$$(android-$(1)_CFLAGS)
|
||||
|
||||
_android_$(1)_CXXFLAGS= \
|
||||
$(if $(filter $(RELEASE),true),-O2 -g,-O0 -ggdb3 -fno-omit-frame-pointer) \
|
||||
_android-$(1)_CXXFLAGS= \
|
||||
-fstack-protector \
|
||||
-DMONODROID=1 \
|
||||
$$(android_$(1)_CXXFLAGS)
|
||||
$$(android-$(1)_CXXFLAGS)
|
||||
|
||||
_android_$(1)_LDFLAGS= \
|
||||
_android-$(1)_CPPFLAGS= \
|
||||
-I$$(ANDROID_TOOLCHAIN_PREFIX)/$(1)-clang/usr/include
|
||||
|
||||
_android-$(1)_CXXCPPFLAGS= \
|
||||
-I$$(ANDROID_TOOLCHAIN_PREFIX)/$(1)-clang/usr/include
|
||||
|
||||
_android-$(1)_LDFLAGS= \
|
||||
-z now -z relro -z noexecstack \
|
||||
-ldl -lm -llog -lc -lgcc \
|
||||
-Wl,-rpath-link=$$(NDK_DIR)/platforms/android-$$(ANDROID_PLATFORM_VERSION_$(1))/arch-$(2)/usr/lib,-dynamic-linker=/system/bin/linker \
|
||||
-L$$(NDK_DIR)/platforms/android-$$(ANDROID_PLATFORM_VERSION_$(1))/arch-$(2)/usr/lib \
|
||||
$$(android_$(1)_LDFLAGS)
|
||||
-Wl,-rpath-link=$$(ANDROID_TOOLCHAIN_DIR)/ndk/platforms/android-$$(ANDROID_SDK_VERSION_$(1))/arch-$(2)/usr/lib,-dynamic-linker=/system/bin/linker \
|
||||
-L$$(ANDROID_TOOLCHAIN_DIR)/ndk/platforms/android-$$(ANDROID_SDK_VERSION_$(1))/arch-$(2)/usr/lib \
|
||||
$$(android-$(1)_LDFLAGS)
|
||||
|
||||
_android_$(1)_CONFIGURE_ENVIRONMENT = \
|
||||
AR="$$(_android_$(1)_AR)" \
|
||||
AS="$$(_android_$(1)_AS)" \
|
||||
CC="$$(_android_$(1)_CC)" \
|
||||
CFLAGS="$$(_android_$(1)_CFLAGS)" \
|
||||
CXX="$$(_android_$(1)_CXX)" \
|
||||
CXXFLAGS="$$(_android_$(1)_CXXFLAGS) " \
|
||||
CPP="$$(_android_$(1)_CPP) $$(_android_$(1)_CPPFLAGS)" \
|
||||
CXXCPP="$$(_android_$(1)_CXXCPP)" \
|
||||
DLLTOOL="$$(_android_$(1)_DLLTOOL)" \
|
||||
LD="$$(_android_$(1)_LD)" \
|
||||
LDFLAGS="$$(_android_$(1)_LDFLAGS)" \
|
||||
OBJDUMP="$$(_android_$(1)_OBJDUMP)" \
|
||||
STRIP="$$(_android_$(1)_STRIP)" \
|
||||
RANLIB="$$(_android_$(1)_RANLIB)"
|
||||
|
||||
_android_$(1)_CONFIGURE_FLAGS= \
|
||||
_android-$(1)_CONFIGURE_FLAGS= \
|
||||
--host=$(4) \
|
||||
--cache-file=$$(TOP)/sdks/builds/android-$(1)-$$(CONFIGURATION).config.cache \
|
||||
--prefix=$$(TOP)/sdks/out/android-$(1)-$$(CONFIGURATION) \
|
||||
@@ -76,75 +153,42 @@ _android_$(1)_CONFIGURE_FLAGS= \
|
||||
--enable-dynamic-btls \
|
||||
--enable-maintainer-mode \
|
||||
--enable-minimal=ssa,portability,attach,verifier,full_messages,sgen_remset,sgen_marksweep_par,sgen_marksweep_fixed,sgen_marksweep_fixed_par,sgen_copying,logging,security,shared_handles,interpreter \
|
||||
--with-btls-android-ndk=$$(NDK_DIR) \
|
||||
--with-btls-android-ndk=$$(ANDROID_TOOLCHAIN_DIR)/ndk \
|
||||
--with-sigaltstack=yes \
|
||||
--with-tls=pthread \
|
||||
--without-ikvm-native
|
||||
|
||||
.stamp-android-$(1)-toolchain:
|
||||
python "$$(NDK_DIR)/build/tools/make_standalone_toolchain.py" --verbose --force --api=$$(ANDROID_PLATFORM_VERSION_$(1)) --arch=$(2) --install-dir=$$(TOP)/sdks/builds/toolchains/android-$(1)
|
||||
.stamp-android-$(1)-toolchain: | $$(if $$(IGNORE_PROVISION_ANDROID),,provision-android)
|
||||
python "$$(ANDROID_TOOLCHAIN_DIR)/ndk/build/tools/make_standalone_toolchain.py" --verbose --force --api=$$(ANDROID_SDK_VERSION_$(1)) --arch=$(2) --install-dir=$$(ANDROID_TOOLCHAIN_PREFIX)/$(1)-clang
|
||||
touch $$@
|
||||
|
||||
.stamp-android-$(1)-$$(CONFIGURATION)-configure: $$(TOP)/configure .stamp-android-$(1)-toolchain
|
||||
mkdir -p $$(TOP)/sdks/builds/android-$(1)-$$(CONFIGURATION)
|
||||
cd $$(TOP)/sdks/builds/android-$(1)-$$(CONFIGURATION) && $$(TOP)/configure $$(_android_$(1)_AC_VARS) $$(_android_$(1)_CONFIGURE_ENVIRONMENT) $$(_android_$(1)_CONFIGURE_FLAGS)
|
||||
touch $$@
|
||||
|
||||
.PHONY: .stamp-android-$(1)-configure
|
||||
.stamp-android-$(1)-configure: .stamp-android-$(1)-$$(CONFIGURATION)-configure
|
||||
|
||||
.PHONY: build-custom-android-$(1)
|
||||
build-custom-android-$(1):
|
||||
$$(MAKE) -C android-$(1)-$$(CONFIGURATION)
|
||||
|
||||
.PHONY: setup-custom-android-$(1)
|
||||
setup-custom-android-$(1):
|
||||
mkdir -p $$(TOP)/sdks/out/android-$(1)-$$(CONFIGURATION)
|
||||
|
||||
.PHONY: package-android-$(1)-$$(CONFIGURATION)
|
||||
package-android-$(1)-$$(CONFIGURATION):
|
||||
$$(MAKE) -C $$(TOP)/sdks/builds/android-$(1)-$$(CONFIGURATION)/mono install
|
||||
$$(MAKE) -C $$(TOP)/sdks/builds/android-$(1)-$$(CONFIGURATION)/support install
|
||||
|
||||
.PHONY: package-android-$(1)
|
||||
package-android-$(1):
|
||||
$$(MAKE) package-android-$(1)-$$(CONFIGURATION)
|
||||
|
||||
.PHONY: clean-android-$(1)-$$(CONFIGURATION)
|
||||
clean-android-$(1)-$$(CONFIGURATION):
|
||||
rm -rf .stamp-android-$(1)-toolchain .stamp-android-$(1)-$$(CONFIGURATION)-configure $$(TOP)/sdks/builds/toolchains/android-$(1) $$(TOP)/sdks/builds/android-$(1)-$$(CONFIGURATION) $$(TOP)/sdks/builds/android-$(1)-$$(CONFIGURATION).config.cache $$(TOP)/sdks/out/android-$(1)-$$(CONFIGURATION)
|
||||
|
||||
.PHONY: clean-android-$(1)
|
||||
clean-android-$(1):
|
||||
$$(MAKE) clean-android-$(1)-$$(CONFIGURATION)
|
||||
|
||||
TARGETS += android-$(1)
|
||||
$$(eval $$(call RuntimeTemplate,android-$(1)))
|
||||
|
||||
endef
|
||||
|
||||
## android-armeabi
|
||||
android_armeabi_CFLAGS=-D__POSIX_VISIBLE=201002 -DSK_RELEASE -DNDEBUG -UDEBUG -fpic -march=armv5te
|
||||
android_armeabi_CXXFLAGS=-D__POSIX_VISIBLE=201002 -DSK_RELEASE -DNDEBUG -UDEBUG -fpic -march=armv5te
|
||||
android_armeabi_LDFLAGS=-Wl,--fix-cortex-a8
|
||||
android-armeabi_CFLAGS=-D__POSIX_VISIBLE=201002 -DSK_RELEASE -DNDEBUG -UDEBUG -fpic -march=armv5te
|
||||
android-armeabi_CXXFLAGS=-D__POSIX_VISIBLE=201002 -DSK_RELEASE -DNDEBUG -UDEBUG -fpic -march=armv5te
|
||||
android-armeabi_LDFLAGS=-Wl,--fix-cortex-a8
|
||||
$(eval $(call AndroidTargetTemplate,armeabi,arm,arm-linux-androideabi,armv5-linux-androideabi))
|
||||
|
||||
## android-armeabi-v7a
|
||||
android_armeabi-v7a_CFLAGS=-D__POSIX_VISIBLE=201002 -DSK_RELEASE -DNDEBUG -UDEBUG -fpic -march=armv7-a -mtune=cortex-a8 -mfpu=vfp -mfloat-abi=softfp
|
||||
android_armeabi-v7a_CXXFLAGS=-D__POSIX_VISIBLE=201002 -DSK_RELEASE -DNDEBUG -UDEBUG -fpic -march=armv7-a -mtune=cortex-a8 -mfpu=vfp -mfloat-abi=softfp
|
||||
android_armeabi-v7a_LDFLAGS=-Wl,--fix-cortex-a8
|
||||
android-armeabi-v7a_CFLAGS=-D__POSIX_VISIBLE=201002 -DSK_RELEASE -DNDEBUG -UDEBUG -fpic -march=armv7-a -mtune=cortex-a8 -mfpu=vfp -mfloat-abi=softfp
|
||||
android-armeabi-v7a_CXXFLAGS=-D__POSIX_VISIBLE=201002 -DSK_RELEASE -DNDEBUG -UDEBUG -fpic -march=armv7-a -mtune=cortex-a8 -mfpu=vfp -mfloat-abi=softfp
|
||||
android-armeabi-v7a_LDFLAGS=-Wl,--fix-cortex-a8
|
||||
$(eval $(call AndroidTargetTemplate,armeabi-v7a,arm,arm-linux-androideabi,armv5-linux-androideabi))
|
||||
|
||||
## android-arm64-v8a
|
||||
android_arm64-v8a_CFLAGS=-D__POSIX_VISIBLE=201002 -DSK_RELEASE -DNDEBUG -UDEBUG -fpic -DL_cuserid=9 -DANDROID64
|
||||
android_arm64-v8a_CXXFLAGS=-D__POSIX_VISIBLE=201002 -DSK_RELEASE -DNDEBUG -UDEBUG -fpic -DL_cuserid=9 -DANDROID64
|
||||
android-arm64-v8a_CFLAGS=-D__POSIX_VISIBLE=201002 -DSK_RELEASE -DNDEBUG -UDEBUG -fpic -DL_cuserid=9 -DANDROID64
|
||||
android-arm64-v8a_CXXFLAGS=-D__POSIX_VISIBLE=201002 -DSK_RELEASE -DNDEBUG -UDEBUG -fpic -DL_cuserid=9 -DANDROID64
|
||||
$(eval $(call AndroidTargetTemplate,arm64-v8a,arm64,aarch64-linux-android,aarch64-linux-android))
|
||||
|
||||
## android-x86
|
||||
$(eval $(call AndroidTargetTemplate,x86,x86,i686-linux-android,i686-linux-android))
|
||||
|
||||
## android-x86_64
|
||||
android_x86_64_CFLAGS=-DL_cuserid=9
|
||||
android_x86_64_CXXFLAGS=-DL_cuserid=9
|
||||
android-x86_64_CFLAGS=-DL_cuserid=9
|
||||
android-x86_64_CXXFLAGS=-DL_cuserid=9
|
||||
$(eval $(call AndroidTargetTemplate,x86_64,x86_64,x86_64-linux-android,x86_64-linux-android))
|
||||
|
||||
##
|
||||
@@ -152,43 +196,23 @@ $(eval $(call AndroidTargetTemplate,x86_64,x86_64,x86_64-linux-android,x86_64-li
|
||||
# $(1): target
|
||||
#
|
||||
# Flags:
|
||||
# android_$(1)_CFLAGS
|
||||
# android_$(1)_CXXFLAGS
|
||||
#
|
||||
# Notes:
|
||||
# XA doesn't seem to build differently for Darwin and Linux, seems like a bug on their end
|
||||
# android-$(1)_CFLAGS
|
||||
# android-$(1)_CXXFLAGS
|
||||
define AndroidHostTemplate
|
||||
|
||||
_android_$(1)_AR=ar
|
||||
_android_$(1)_AS=as
|
||||
_android_$(1)_CC=cc
|
||||
_android_$(1)_CXX=c++
|
||||
_android_$(1)_CXXCPP=cpp
|
||||
_android_$(1)_LD=ld
|
||||
_android_$(1)_RANLIB=ranlib
|
||||
_android_$(1)_STRIP=strip
|
||||
_android-$(1)_AR=ar
|
||||
_android-$(1)_AS=as
|
||||
_android-$(1)_CC=cc
|
||||
_android-$(1)_CXX=c++
|
||||
_android-$(1)_CXXCPP=cpp
|
||||
_android-$(1)_LD=ld
|
||||
_android-$(1)_RANLIB=ranlib
|
||||
_android-$(1)_STRIP=strip
|
||||
|
||||
_android_$(1)_CFLAGS= \
|
||||
$(if $(filter $(RELEASE),true),-O2 -g,-O0 -ggdb3 -fno-omit-frame-pointer) \
|
||||
$$(android_$(1)_CFLAGS)
|
||||
_android-$(1)_CFLAGS=$$(android-$(1)_CFLAGS)
|
||||
_android-$(1)_CXXFLAGS=$$(android-$(1)_CXXFLAGS)
|
||||
|
||||
_android_$(1)_CXXFLAGS= \
|
||||
$(if $(filter $(RELEASE),true),-O2 -g,-O0 -ggdb3 -fno-omit-frame-pointer) \
|
||||
$$(android_$(1)_CXXFLAGS)
|
||||
|
||||
_android_$(1)_CONFIGURE_ENVIRONMENT= \
|
||||
AR="$$(_android_$(1)_AR)" \
|
||||
AS="$$(_android_$(1)_AS)" \
|
||||
CC="$$(_android_$(1)_CC)" \
|
||||
CFLAGS="$$(_android_$(1)_CFLAGS)" \
|
||||
CXX="$$(_android_$(1)_CXX)" \
|
||||
CXXFLAGS="$$(_android_$(1)_CXXFLAGS)" \
|
||||
CXXCPP="$$(_android_$(1)_CXXCPP)" \
|
||||
LD="$$(_android_$(1)_LD)" \
|
||||
RANLIB="$$(_android_$(1)_RANLIB)" \
|
||||
STRIP="$$(_android_$(1)_STRIP)"
|
||||
|
||||
_android_$(1)_CONFIGURE_FLAGS= \
|
||||
_android-$(1)_CONFIGURE_FLAGS= \
|
||||
--cache-file=$$(TOP)/sdks/builds/android-$(1)-$$(CONFIGURATION).config.cache \
|
||||
--prefix=$$(TOP)/sdks/out/android-$(1)-$$(CONFIGURATION) \
|
||||
--disable-boehm \
|
||||
@@ -205,44 +229,11 @@ _android_$(1)_CONFIGURE_FLAGS= \
|
||||
.stamp-android-$(1)-toolchain:
|
||||
touch $$@
|
||||
|
||||
.stamp-android-$(1)-$$(CONFIGURATION)-configure: $$(TOP)/configure .stamp-android-$(1)-toolchain
|
||||
mkdir -p $$(TOP)/sdks/builds/android-$(1)-$$(CONFIGURATION)
|
||||
cd $$(TOP)/sdks/builds/android-$(1)-$$(CONFIGURATION) && $$< $$(_android_$(1)_CONFIGURE_ENVIRONMENT) $$(_android_$(1)_CONFIGURE_FLAGS)
|
||||
touch $$@
|
||||
|
||||
.PHONY: .stamp-android-$(1)-configure
|
||||
.stamp-android-$(1)-configure: .stamp-android-$(1)-$$(CONFIGURATION)-configure
|
||||
|
||||
.PHONY: build-custom-android-$(1)
|
||||
build-custom-android-$(1):
|
||||
$$(MAKE) -C android-$(1)-$$(CONFIGURATION)
|
||||
|
||||
.PHONY: setup-custom-android-$(1)
|
||||
setup-custom-android-$(1):
|
||||
mkdir -p $$(TOP)/sdks/out/android-$(1)-$$(CONFIGURATION)
|
||||
|
||||
.PHONY: package-android-$(1)-$$(CONFIGURATION)
|
||||
package-android-$(1)-$$(CONFIGURATION):
|
||||
$$(MAKE) -C $$(TOP)/sdks/builds/android-$(1)-$$(CONFIGURATION)/mono install
|
||||
$$(MAKE) -C $$(TOP)/sdks/builds/android-$(1)-$$(CONFIGURATION)/support install
|
||||
|
||||
.PHONY: package-android-$(1)
|
||||
package-android-$(1):
|
||||
$$(MAKE) package-android-$(1)-$$(CONFIGURATION)
|
||||
|
||||
.PHONY: clean-android-$(1)-$$(CONFIGURATION)
|
||||
clean-android-$(1)-$$(CONFIGURATION):
|
||||
rm -rf .stamp-android-$(1)-toolchain .stamp-android-$(1)-$$(CONFIGURATION)-configure $$(TOP)/sdks/builds/android-$(1)-$$(CONFIGURATION) $$(TOP)/sdks/builds/android-$(1)-$$(CONFIGURATION).config.cache $$(TOP)/sdks/out/android-$(1)-$$(CONFIGURATION)
|
||||
|
||||
.PHONY: clean-android-$(1)
|
||||
clean-android-$(1):
|
||||
$$(MAKE) clean-android-$(1)-$$(CONFIGURATION)
|
||||
|
||||
TARGETS += android-$(1)
|
||||
$$(eval $$(call RuntimeTemplate,android-$(1)))
|
||||
|
||||
endef
|
||||
|
||||
android_host-Darwin_CFLAGS=-mmacosx-version-min=10.9
|
||||
android-host-Darwin_CFLAGS=-mmacosx-version-min=10.9
|
||||
$(eval $(call AndroidHostTemplate,host-Darwin))
|
||||
$(eval $(call AndroidHostTemplate,host-Linux))
|
||||
|
||||
@@ -252,44 +243,31 @@ $(eval $(call AndroidHostTemplate,host-Linux))
|
||||
# $(2): arch
|
||||
define AndroidHostMxeTemplate
|
||||
|
||||
_android_$(1)_PATH=$$(TOP)/sdks/out/mxe/bin
|
||||
_android-$(1)_PATH=$$(MXE_PREFIX)/bin
|
||||
|
||||
_android_$(1)_AR=$$(TOP)/sdks/out/mxe/bin/$(2)-w64-mingw32.static-ar
|
||||
_android_$(1)_AS=$$(TOP)/sdks/out/mxe/bin/$(2)-w64-mingw32.static-as
|
||||
_android_$(1)_CC=$$(TOP)/sdks/out/mxe/bin/$(2)-w64-mingw32.static-gcc
|
||||
_android_$(1)_CXX=$$(TOP)/sdks/out/mxe/bin/$(2)-w64-mingw32.static-g++
|
||||
_android_$(1)_DLLTOOL=$$(TOP)/sdks/out/mxe/bin/$(2)-w64-mingw32.static-dlltool
|
||||
_android_$(1)_LD=$$(TOP)/sdks/out/mxe/bin/$(2)-w64-mingw32.static-ld
|
||||
_android_$(1)_OBJDUMP=$$(TOP)/sdks/out/mxe/bin/$(2)-w64-mingw32.static-objdump
|
||||
_android_$(1)_RANLIB=$$(TOP)/sdks/out/mxe/bin/$(2)-w64-mingw32.static-ranlib
|
||||
_android_$(1)_STRIP=$$(TOP)/sdks/out/mxe/bin/$(2)-w64-mingw32.static-strip
|
||||
_android-$(1)_AR=$$(MXE_PREFIX)/bin/$(2)-w64-mingw32$$(if $$(filter $(UNAME),Darwin),.static)-ar
|
||||
_android-$(1)_AS=$$(MXE_PREFIX)/bin/$(2)-w64-mingw32$$(if $$(filter $(UNAME),Darwin),.static)-as
|
||||
_android-$(1)_CC=$$(MXE_PREFIX)/bin/$(2)-w64-mingw32$$(if $$(filter $(UNAME),Darwin),.static)-gcc
|
||||
_android-$(1)_CXX=$$(MXE_PREFIX)/bin/$(2)-w64-mingw32$$(if $$(filter $(UNAME),Darwin),.static)-g++
|
||||
_android-$(1)_DLLTOOL=$$(MXE_PREFIX)/bin/$(2)-w64-mingw32$$(if $$(filter $(UNAME),Darwin),.static)-dlltool
|
||||
_android-$(1)_LD=$$(MXE_PREFIX)/bin/$(2)-w64-mingw32$$(if $$(filter $(UNAME),Darwin),.static)-ld
|
||||
_android-$(1)_OBJDUMP=$$(MXE_PREFIX)/bin/$(2)-w64-mingw32$$(if $$(filter $(UNAME),Darwin),.static)-objdump
|
||||
_android-$(1)_RANLIB=$$(MXE_PREFIX)/bin/$(2)-w64-mingw32$$(if $$(filter $(UNAME),Darwin),.static)-ranlib
|
||||
_android-$(1)_STRIP=$$(MXE_PREFIX)/bin/$(2)-w64-mingw32$$(if $$(filter $(UNAME),Darwin),.static)-strip
|
||||
|
||||
_android_$(1)_AC_VARS= \
|
||||
_android-$(1)_AC_VARS= \
|
||||
ac_cv_header_zlib_h=no \
|
||||
ac_cv_search_dlopen=no
|
||||
|
||||
_android_$(1)_CFLAGS= \
|
||||
$(if $(filter $(RELEASE),true),-O2 -g,-O0 -ggdb3 -fno-omit-frame-pointer) \
|
||||
_android-$(1)_CFLAGS= \
|
||||
-DXAMARIN_PRODUCT_VERSION=0
|
||||
|
||||
_android_$(1)_CXXFLAGS= \
|
||||
$(if $(filter $(RELEASE),true),-O2 -g,-O0 -ggdb3 -fno-omit-frame-pointer) \
|
||||
_android-$(1)_CXXFLAGS= \
|
||||
-DXAMARIN_PRODUCT_VERSION=0
|
||||
|
||||
_android_$(1)_CONFIGURE_ENVIRONMENT= \
|
||||
AR="$$(_android_$(1)_AR)" \
|
||||
AS="$$(_android_$(1)_AS)" \
|
||||
CC="$$(_android_$(1)_CC)" \
|
||||
CFLAGS="$$(_android_$(1)_CFLAGS)" \
|
||||
CXX="$$(_android_$(1)_CXX)" \
|
||||
CXXFLAGS="$$(_android_$(1)_CXXFLAGS)" \
|
||||
LD="$$(_android_$(1)_LD)" \
|
||||
RANLIB="$$(_android_$(1)_RANLIB)" \
|
||||
STRIP="$$(_android_$(1)_STRIP)"
|
||||
|
||||
_android_$(1)_CONFIGURE_FLAGS= \
|
||||
--host=$(2)-w64-mingw32.static \
|
||||
--target=$(2)-w64-mingw32.static \
|
||||
_android-$(1)_CONFIGURE_FLAGS= \
|
||||
--host=$(2)-w64-mingw32$$(if $$(filter $(UNAME),Darwin),.static) \
|
||||
--target=$(2)-w64-mingw32$$(if $$(filter $(UNAME),Darwin),.static) \
|
||||
--cache-file=$$(TOP)/sdks/builds/android-$(1)-$$(CONFIGURATION).config.cache \
|
||||
--prefix=$$(TOP)/sdks/out/android-$(1)-$$(CONFIGURATION) \
|
||||
--disable-boehm \
|
||||
@@ -302,42 +280,13 @@ _android_$(1)_CONFIGURE_FLAGS= \
|
||||
.stamp-android-$(1)-toolchain:
|
||||
touch $$@
|
||||
|
||||
.stamp-android-$(1)-$$(CONFIGURATION)-configure: $$(TOP)/configure .stamp-android-$(1)-toolchain | package-mxe
|
||||
mkdir -p $$(TOP)/sdks/builds/android-$(1)-$$(CONFIGURATION)
|
||||
cd $$(TOP)/sdks/builds/android-$(1)-$$(CONFIGURATION) && PATH="$$$$PATH:$$(_android_$(1)_PATH)" $$< $$(_android_$(1)_AC_VARS) $$(_android_$(1)_CONFIGURE_ENVIRONMENT) $$(_android_$(1)_CONFIGURE_FLAGS)
|
||||
touch $$@
|
||||
.stamp-android-$(1)-$$(CONFIGURATION)-configure: | $(if $(IGNORE_PROVISION_MXE),,provision-mxe)
|
||||
|
||||
.PHONY: .stamp-android-$(1)-configure
|
||||
.stamp-android-$(1)-configure: .stamp-android-$(1)-$$(CONFIGURATION)-configure
|
||||
|
||||
.PHONY: build-custom-android-$(1)
|
||||
build-custom-android-$(1):
|
||||
$$(MAKE) -C android-$(1)-$$(CONFIGURATION)
|
||||
|
||||
.PHONY: setup-custom-android-$(1)
|
||||
setup-custom-android-$(1):
|
||||
mkdir -p $$(TOP)/sdks/out/android-$(1)-$$(CONFIGURATION)
|
||||
|
||||
.PHONY: package-android-$(1)-$$(CONFIGURATION)
|
||||
package-android-$(1)-$$(CONFIGURATION):
|
||||
$$(MAKE) -C $$(TOP)/sdks/builds/android-$(1)-$$(CONFIGURATION)/mono install
|
||||
$$(MAKE) -C $$(TOP)/sdks/builds/android-$(1)-$$(CONFIGURATION)/support install
|
||||
|
||||
.PHONY: package-android-$(1)
|
||||
package-android-$(1):
|
||||
$$(MAKE) package-android-$(1)-$$(CONFIGURATION)
|
||||
|
||||
.PHONY: clean-android-$(1)-$$(CONFIGURATION)
|
||||
clean-android-$(1)-$$(CONFIGURATION):
|
||||
rm -rf .stamp-android-$(1)-toolchain .stamp-android-$(1)-$$(CONFIGURATION)-configure $$(TOP)/sdks/builds/android-$(1)-$$(CONFIGURATION) $$(TOP)/sdks/builds/android-$(1)-$$(CONFIGURATION).config.cache $$(TOP)/sdks/out/android-$(1)-$$(CONFIGURATION)
|
||||
|
||||
.PHONY: clean-android-$(1)
|
||||
clean-android-$(1):
|
||||
$$(MAKE) clean-android-$(1)-$$(CONFIGURATION)
|
||||
|
||||
TARGETS += android-$(1)
|
||||
$$(eval $$(call RuntimeTemplate,android-$(1)))
|
||||
|
||||
endef
|
||||
|
||||
ifneq ($(MXE_PREFIX),)
|
||||
$(eval $(call AndroidHostMxeTemplate,host-mxe-Win32,i686))
|
||||
$(eval $(call AndroidHostMxeTemplate,host-mxe-Win64,x86_64))
|
||||
endif
|
||||
+18
-1
@@ -2,9 +2,26 @@
|
||||
.stamp-bcl-toolchain:
|
||||
touch $@
|
||||
|
||||
bcl-ios_CONFIGURE_FLAGS = \
|
||||
--with-monotouch=yes \
|
||||
--with-monotouch_tv=yes \
|
||||
--with-xammac=yes \
|
||||
--with-monotouch_watch=yes
|
||||
|
||||
bcl_CONFIGURE_FLAGS = \
|
||||
--with-profile4_x=no \
|
||||
$(if $(DISABLE_ANDROID),,--with-monodroid=yes) \
|
||||
$(if $(DISABLE_IOS),,$(bcl-ios_CONFIGURE_FLAGS)) \
|
||||
$(if $(DISABLE_WASM),,--with-wasm=yes) \
|
||||
--with-mcs-docs=no \
|
||||
--disable-nls \
|
||||
--disable-btls-lib \
|
||||
--disable-support-build \
|
||||
--disable-boehm
|
||||
|
||||
.stamp-bcl-configure: $(TOP)/configure
|
||||
mkdir -p $(TOP)/sdks/builds/bcl
|
||||
cd $(TOP)/sdks/builds/bcl && $(TOP)/configure --with-profile4_x=no $(if $(DISABLE_ANDROID),,--with-monodroid=yes) $(if $(DISABLE_IOS),,--with-monotouch=yes) $(if $(DISABLE_WASM),,--with-wasm=yes) --with-mcs-docs=no --disable-nls --disable-boehm
|
||||
cd $(TOP)/sdks/builds/bcl && $(TOP)/configure $(bcl_CONFIGURE_FLAGS)
|
||||
touch $@
|
||||
|
||||
$(TOP)/sdks/out/bcl/monodroid $(TOP)/sdks/out/bcl/monotouch $(TOP)/sdks/out/bcl/wasm:
|
||||
|
||||
+177
-190
@@ -1,3 +1,6 @@
|
||||
|
||||
include runtime.mk
|
||||
|
||||
#
|
||||
# Targets:
|
||||
# - build-ios-<target>
|
||||
@@ -11,15 +14,7 @@
|
||||
|
||||
PLATFORM_BIN=$(XCODE_DIR)/Toolchains/XcodeDefault.xctoolchain/usr/bin
|
||||
|
||||
ios_CFLAGS= \
|
||||
$(if $(filter $(RELEASE),true),-O2,-O0 -ggdb3 -gdwarf-2)
|
||||
|
||||
ios_CPPFLAGS= \
|
||||
$(if $(filter $(RELEASE),true),-O2,-O0 -ggdb3 -gdwarf-2) \
|
||||
-DMONOTOUCH=1
|
||||
|
||||
ios_CXXFLAGS= \
|
||||
$(if $(filter $(RELEASE),true),-O2,-O0 -ggdb3 -gdwarf-2)
|
||||
ios_CPPFLAGS=-DMONOTOUCH=1
|
||||
|
||||
ios_LDFLAGS=
|
||||
|
||||
@@ -38,23 +33,23 @@ BITCODE_CONFIGURE_FLAGS=--enable-llvm-runtime --with-bitcode=yes
|
||||
# $(3): arch (arm or aarch64)
|
||||
#
|
||||
# Flags:
|
||||
# ios_$(1)_AC_VARS
|
||||
# ios_$(1)_SYSROOT
|
||||
# ios_$(1)_CONFIGURE_FLAGS
|
||||
# ios_$(1)_CFLAGS
|
||||
# ios_$(1)_CPPFLAGS
|
||||
# ios_$(1)_CXXFLAGS
|
||||
# ios_$(1)_LDFLAGS
|
||||
# ios_$(1)_BITCODE_MARKER
|
||||
# ios-$(1)_AC_VARS
|
||||
# ios-$(1)_SYSROOT
|
||||
# ios-$(1)_CONFIGURE_FLAGS
|
||||
# ios-$(1)_CFLAGS
|
||||
# ios-$(1)_CPPFLAGS
|
||||
# ios-$(1)_CXXFLAGS
|
||||
# ios-$(1)_LDFLAGS
|
||||
# ios-$(1)_BITCODE_MARKER
|
||||
#
|
||||
# This handles tvos as well.
|
||||
# This handles tvos/watchos as well.
|
||||
#
|
||||
define iOSDeviceTemplate
|
||||
|
||||
_ios_$(1)_CC=$$(CCACHE) $$(PLATFORM_BIN)/clang
|
||||
_ios_$(1)_CXX=$$(CCACHE) $$(PLATFORM_BIN)/clang++
|
||||
_ios-$(1)_CC=$$(CCACHE) $$(PLATFORM_BIN)/clang
|
||||
_ios-$(1)_CXX=$$(CCACHE) $$(PLATFORM_BIN)/clang++
|
||||
|
||||
_ios_$(1)_AC_VARS= \
|
||||
_ios-$(1)_AC_VARS= \
|
||||
ac_cv_c_bigendian=no \
|
||||
ac_cv_func_finite=no \
|
||||
ac_cv_func_getpwuid_r=no \
|
||||
@@ -67,53 +62,43 @@ _ios_$(1)_AC_VARS= \
|
||||
ac_cv_func_utimensat=no \
|
||||
mono_cv_sizeof_sunpath=104 \
|
||||
mono_cv_uscore=yes \
|
||||
$$(ios_$(1)_AC_VARS)
|
||||
$$(ios-$(1)_AC_VARS)
|
||||
|
||||
_ios_$(1)_CFLAGS= \
|
||||
$$(ios_CFLAGS) \
|
||||
$$(ios_$(1)_SYSROOT) \
|
||||
_ios-$(1)_CFLAGS= \
|
||||
$$(ios-$(1)_SYSROOT) \
|
||||
-arch $(2) \
|
||||
-Wl,-application_extension \
|
||||
-fexceptions \
|
||||
$$(ios_$(1)_BITCODE_MARKER) \
|
||||
$$(ios_$(1)_CFLAGS)
|
||||
$$(ios-$(1)_BITCODE_MARKER) \
|
||||
$$(ios-$(1)_CFLAGS)
|
||||
|
||||
_ios_$(1)_CXXFLAGS= \
|
||||
$$(ios_CXXFLAGS) \
|
||||
$$(ios_$(1)_SYSROOT) \
|
||||
_ios-$(1)_CXXFLAGS= \
|
||||
$$(ios-$(1)_SYSROOT) \
|
||||
-arch $(2) \
|
||||
-Wl,-application_extension \
|
||||
$$(ios_$(1)_CXXFLAGS) \
|
||||
$$(ios_$(1)_BITCODE_MARKER)
|
||||
$$(ios-$(1)_CXXFLAGS) \
|
||||
$$(ios-$(1)_BITCODE_MARKER)
|
||||
|
||||
_ios_$(1)_CPPFLAGS= \
|
||||
_ios-$(1)_CPPFLAGS= \
|
||||
$$(ios_CPPFLAGS) \
|
||||
$$(ios_$(1)_SYSROOT) \
|
||||
$$(ios-$(1)_SYSROOT) \
|
||||
-arch $(2) \
|
||||
-DSMALL_CONFIG -DDISABLE_POLICY_EVIDENCE=1 -DDISABLE_PROCESS_HANDLING=1 -D_XOPEN_SOURCE -DHOST_IOS -DHAVE_LARGE_FILE_SUPPORT=1 \
|
||||
$$(ios_$(1)_CPPFLAGS)
|
||||
$$(ios-$(1)_CPPFLAGS)
|
||||
|
||||
_ios_$(1)_LDFLAGS= \
|
||||
_ios-$(1)_LDFLAGS= \
|
||||
$$(ios_LDFLAGS) \
|
||||
-Wl,-no_weak_imports \
|
||||
-arch $(2) \
|
||||
-framework CoreFoundation \
|
||||
-lobjc -lc++ \
|
||||
$$(ios_$(1)_LDFLAGS)
|
||||
$$(ios-$(1)_LDFLAGS)
|
||||
|
||||
_ios_$(1)_CONFIGURE_ENVIRONMENT = \
|
||||
CC="$$(_ios_$(1)_CC)" \
|
||||
CXX="$$(_ios_$(1)_CXX)" \
|
||||
CFLAGS="$$(_ios_$(1)_CFLAGS)" \
|
||||
CPPFLAGS="$$(_ios_$(1)_CPPFLAGS)" \
|
||||
CXXFLAGS="$$(_ios_$(1)_CXXFLAGS)" \
|
||||
LDFLAGS="$$(_ios_$(1)_LDFLAGS)"
|
||||
|
||||
_ios_$(1)_CONFIGURE_FLAGS = \
|
||||
_ios-$(1)_CONFIGURE_FLAGS = \
|
||||
--build=i386-apple-darwin10 \
|
||||
--host=$(3)-apple-darwin10 \
|
||||
--cache-file=$(TOP)/sdks/builds/ios-$(1).config.cache \
|
||||
--prefix=$(TOP)/sdks/out/ios-$(1) \
|
||||
--cache-file=$(TOP)/sdks/builds/ios-$(1)-$$(CONFIGURATION).config.cache \
|
||||
--prefix=$(TOP)/sdks/out/ios-$(1)-$$(CONFIGURATION) \
|
||||
--disable-boehm \
|
||||
--disable-btls \
|
||||
--disable-executables \
|
||||
@@ -126,56 +111,50 @@ _ios_$(1)_CONFIGURE_FLAGS = \
|
||||
--enable-dtrace=no \
|
||||
--enable-icall-export \
|
||||
--enable-maintainer-mode \
|
||||
--enable-minimal=ssa,com,jit,reflection_emit_save,reflection_emit,portability,assembly_remapping,attach,verifier,full_messages,appdomains,security,sgen_remset,sgen_marksweep_par,sgen_marksweep_fixed,sgen_marksweep_fixed_par,sgen_copying,logging,remoting,shared_perfcounters \
|
||||
--enable-minimal=ssa,com,interpreter,jit,reflection_emit_save,reflection_emit,portability,assembly_remapping,attach,verifier,full_messages,appdomains,security,sgen_remset,sgen_marksweep_par,sgen_marksweep_fixed,sgen_marksweep_fixed_par,sgen_copying,logging,remoting,shared_perfcounters \
|
||||
--with-lazy-gc-thread-creation=yes \
|
||||
--with-monotouch \
|
||||
--with-tls=pthread \
|
||||
--without-ikvm-native \
|
||||
--without-sigaltstack \
|
||||
$$(ios_$(1)_CONFIGURE_FLAGS)
|
||||
$$(ios-$(1)_CONFIGURE_FLAGS)
|
||||
|
||||
.stamp-ios-$(1)-toolchain:
|
||||
touch $$@
|
||||
|
||||
.stamp-ios-$(1)-configure: $$(TOP)/configure
|
||||
mkdir -p $$(TOP)/sdks/builds/ios-$(1)
|
||||
cd $$(TOP)/sdks/builds/ios-$(1) && PATH="$$(PLATFORM_BIN):$$$$PATH" $$(TOP)/configure $$(_ios_$(1)_AC_VARS) $$(_ios_$(1)_CONFIGURE_ENVIRONMENT) $$(_ios_$(1)_CONFIGURE_FLAGS)
|
||||
touch $$@
|
||||
|
||||
.PHONY: package-ios-$(1)
|
||||
package-ios-$(1):
|
||||
$(MAKE) -C $$(TOP)/sdks/builds/ios-$(1)/mono install
|
||||
|
||||
.PHONY: clean-ios-$(1)
|
||||
clean-ios-$(1):
|
||||
rm -rf .stamp-ios-$(1)-toolchain .stamp-ios-$(1)-configure $$(TOP)/sdks/builds/ios-$(1) $$(TOP)/sdks/builds/ios-$(1).config.cache $$(TOP)/sdks/out/ios-$(1)
|
||||
|
||||
TARGETS += ios-$(1)
|
||||
$$(eval $$(call RuntimeTemplate,ios-$(1)))
|
||||
|
||||
endef
|
||||
|
||||
ios_sysroot = -isysroot $(XCODE_DIR)/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS$(IOS_VERSION).sdk -miphoneos-version-min=$(IOS_VERSION_MIN)
|
||||
tvos_sysroot = -isysroot $(XCODE_DIR)/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS$(TVOS_VERSION).sdk -mtvos-version-min=$(TVOS_VERSION_MIN)
|
||||
watchos_sysroot = -isysroot $(XCODE_DIR)/Platforms/WatchOS.platform/Developer/SDKs/WatchOS$(WATCH_VERSION).sdk -mwatchos-version-min=$(WATCHOS_VERSION_MIN)
|
||||
|
||||
# explicitly disable dtrace, since it requires inline assembly, which is disabled on AppleTV (and mono's configure.ac doesn't know that (yet at least))
|
||||
ios_targettv_CONFIGURE_FLAGS = --enable-dtrace=no $(BITCODE_CONFIGURE_FLAGS)
|
||||
ios-targettv_CONFIGURE_FLAGS = --enable-dtrace=no $(BITCODE_CONFIGURE_FLAGS)
|
||||
ios-targetwatch_CONFIGURE_FLAGS = --with-cooperative-gc=yes $(BITCODE_CONFIGURE_FLAGS)
|
||||
|
||||
ios_target32_SYSROOT = $(ios_sysroot)
|
||||
ios_target32s_SYSROOT = $(ios_sysroot)
|
||||
ios_target64_SYSROOT = $(ios_sysroot)
|
||||
ios_targettv_SYSROOT = $(tvos_sysroot)
|
||||
ios-target32_SYSROOT = $(ios_sysroot)
|
||||
ios-target32s_SYSROOT = $(ios_sysroot)
|
||||
ios-target64_SYSROOT = $(ios_sysroot)
|
||||
ios-targettv_SYSROOT = $(tvos_sysroot)
|
||||
ios-targetwatch_SYSROOT = $(watchos_sysroot)
|
||||
|
||||
ios_target32_CPPFLAGS = -DHOST_IOS
|
||||
ios_target32s_CPPFLAGS = -DHOST_IOS
|
||||
ios_target64_CPPFLAGS = -DHOST_IOS
|
||||
ios_targettv_CPPFLAGS = -DHOST_APPLETVOS -DTARGET_APPLETVOS
|
||||
ios-target32_CPPFLAGS = -DHOST_IOS
|
||||
ios-target32s_CPPFLAGS = -DHOST_IOS
|
||||
ios-target64_CPPFLAGS = -DHOST_IOS
|
||||
ios-targettv_CPPFLAGS = -DHOST_APPLETVOS -DTARGET_APPLETVOS
|
||||
ios-targetwatch_CPPFLAGS = -DHOST_IOS -DHOST_WATCHOS
|
||||
|
||||
ios_targettv_CFLAGS = -fembed-bitcode -fno-gnu-inline-asm
|
||||
ios_targettv_CXXFLAGS = -fembed-bitcode -fno-gnu-inline-asm
|
||||
ios-targettv_CFLAGS = -fembed-bitcode -fno-gnu-inline-asm
|
||||
ios-targettv_CXXFLAGS = -fembed-bitcode -fno-gnu-inline-asm
|
||||
ios-targetwatch_CFLAGS = -fembed-bitcode -fno-gnu-inline-asm
|
||||
ios-targetwatch_CXXFLAGS = -fembed-bitcode -fno-gnu-inline-asm
|
||||
|
||||
ios_targettv_LDFLAGS = -Wl,-bitcode_bundle $(BITCODE_LDFLAGS)
|
||||
ios-targettv_LDFLAGS = -Wl,-bitcode_bundle $(BITCODE_LDFLAGS)
|
||||
ios-targetwatch_LDFLAGS = -Wl,-bitcode_bundle $(BITCODE_LDFLAGS)
|
||||
|
||||
ios_targettv_AC_VARS = \
|
||||
ios-targettv_AC_VARS = \
|
||||
ac_cv_func_system=no \
|
||||
ac_cv_func_pthread_kill=no \
|
||||
ac_cv_func_kill=no \
|
||||
@@ -185,13 +164,15 @@ ios_targettv_AC_VARS = \
|
||||
ac_cv_func_execve=no \
|
||||
ac_cv_func_execvp=no \
|
||||
ac_cv_func_signal=no
|
||||
ios-targetwatch_AC_VARS = $(ios-targettv_AC_VARS)
|
||||
|
||||
# ios_target32_BITCODE_MARKER=-fembed-bitcode-marker
|
||||
# ios-target32_BITCODE_MARKER=-fembed-bitcode-marker
|
||||
$(eval $(call iOSDeviceTemplate,target32,armv7,arm))
|
||||
$(eval $(call iOSDeviceTemplate,target32s,armv7s,arm))
|
||||
# ios_target64_BITCODE_MARKER=-fembed-bitcode-marker
|
||||
# ios-target64_BITCODE_MARKER=-fembed-bitcode-marker
|
||||
$(eval $(call iOSDeviceTemplate,target64,arm64,aarch64))
|
||||
$(eval $(call iOSDeviceTemplate,targettv,arm64,aarch64))
|
||||
$(eval $(call iOSDeviceTemplate,targetwatch,armv7k,armv7k))
|
||||
|
||||
##
|
||||
# Simulator builds
|
||||
@@ -201,17 +182,21 @@ $(eval $(call iOSDeviceTemplate,targettv,arm64,aarch64))
|
||||
# $(2): arch (i386 or x86_64)
|
||||
#
|
||||
# Flags:
|
||||
# ios_$(1)_AC_VARS
|
||||
# ios_$(1)_CFLAGS
|
||||
# ios_$(1)_CPPFLAGS
|
||||
# ios_$(1)_CXXFLAGS
|
||||
# ios_$(1)_LDFLAGS
|
||||
# ios-$(1)_SYSROOT
|
||||
# ios-$(1)_AC_VARS
|
||||
# ios-$(1)_CFLAGS
|
||||
# ios-$(1)_CPPFLAGS
|
||||
# ios-$(1)_CXXFLAGS
|
||||
# ios-$(1)_LDFLAGS
|
||||
#
|
||||
# This handles tvos/watchos as well.
|
||||
#
|
||||
define iOSSimulatorTemplate
|
||||
|
||||
_ios_$(1)_CC=$$(CCACHE) $$(PLATFORM_BIN)/clang
|
||||
_ios_$(1)_CXX=$$(CCACHE) $$(PLATFORM_BIN)/clang++
|
||||
_ios-$(1)_CC=$$(CCACHE) $$(PLATFORM_BIN)/clang
|
||||
_ios-$(1)_CXX=$$(CCACHE) $$(PLATFORM_BIN)/clang++
|
||||
|
||||
_ios_$(1)_AC_VARS= \
|
||||
_ios-$(1)_AC_VARS= \
|
||||
ac_cv_func_clock_nanosleep=no \
|
||||
ac_cv_func_fstatat=no \
|
||||
ac_cv_func_readlinkat=no \
|
||||
@@ -220,48 +205,35 @@ _ios_$(1)_AC_VARS= \
|
||||
ac_cv_func_futimens=no \
|
||||
ac_cv_func_utimensat=no \
|
||||
mono_cv_uscore=yes \
|
||||
$(ios_$(1)_AC_VARS)
|
||||
$(ios-$(1)_AC_VARS)
|
||||
|
||||
_ios_$(1)_CFLAGS= \
|
||||
$$(ios_CFLAGS) \
|
||||
-isysroot $$(XCODE_DIR)/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator$$(IOS_VERSION).sdk -mios-simulator-version-min=$$(IOS_VERSION_MIN) \
|
||||
_ios-$(1)_CFLAGS= \
|
||||
$$(ios-$(1)_SYSROOT) \
|
||||
-arch $(2) \
|
||||
-Wl,-application_extension \
|
||||
-DHOST_IOS \
|
||||
$$(ios_$(1)_CFLAGS)
|
||||
$$(ios-$(1)_CFLAGS)
|
||||
|
||||
_ios_$(1)_CPPFLAGS= \
|
||||
_ios-$(1)_CPPFLAGS= \
|
||||
$$(ios_CPPFLAGS) \
|
||||
-isysroot $$(XCODE_DIR)/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator$$(IOS_VERSION).sdk -mios-simulator-version-min=$$(IOS_VERSION_MIN) \
|
||||
$$(ios-$(1)_SYSROOT) \
|
||||
-arch $(2) \
|
||||
-Wl,-application_extension \
|
||||
-DHOST_IOS \
|
||||
$$(ios_$(1)_CPPFLAGS)
|
||||
$$(ios-$(1)_CPPFLAGS)
|
||||
|
||||
_ios_$(1)_CXXFLAGS= \
|
||||
$$(ios_CXXFLAGS) \
|
||||
-isysroot $$(XCODE_DIR)/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator$$(IOS_VERSION).sdk -mios-simulator-version-min=$$(IOS_VERSION_MIN) \
|
||||
_ios-$(1)_CXXFLAGS= \
|
||||
$$(ios-$(1)_SYSROOT) \
|
||||
-arch $(2) \
|
||||
-Wl,-application_extension\
|
||||
-DHOST_IOS \
|
||||
$$(ios_$(1)_CXXFLAGS)
|
||||
$$(ios-$(1)_CXXFLAGS)
|
||||
|
||||
_ios_$(1)_LDFLAGS= \
|
||||
_ios-$(1)_LDFLAGS= \
|
||||
$$(ios_LDFLAGS) \
|
||||
$$(ios_$(1)_LDFLAGS)
|
||||
$$(ios-$(1)_LDFLAGS)
|
||||
|
||||
_ios_$(1)_CONFIGURE_ENVIRONMENT = \
|
||||
CC="$$(_ios_$(1)_CC)" \
|
||||
CXX="$$(_ios_$(1)_CXX)" \
|
||||
CFLAGS="$$(_ios_$(1)_CFLAGS)" \
|
||||
CPPFLAGS="$$(_ios_$(1)_CPPFLAGS)" \
|
||||
CXXFLAGS="$$(_ios_$(1)_CXXFLAGS)" \
|
||||
LDFLAGS="$$(_ios_$(1)_LDFLAGS)"
|
||||
|
||||
_ios_$(1)_CONFIGURE_FLAGS= \
|
||||
_ios-$(1)_CONFIGURE_FLAGS= \
|
||||
--host=$(2)-apple-darwin10 \
|
||||
--cache-file=$$(TOP)/sdks/builds/ios-$(1).config.cache \
|
||||
--prefix=$$(TOP)/sdks/out/ios-$(1) \
|
||||
--cache-file=$$(TOP)/sdks/builds/ios-$(1)-$$(CONFIGURATION).config.cache \
|
||||
--prefix=$$(TOP)/sdks/out/ios-$(1)-$$(CONFIGURATION) \
|
||||
--disable-boehm \
|
||||
--disable-btls \
|
||||
--disable-executables \
|
||||
@@ -272,48 +244,81 @@ _ios_$(1)_CONFIGURE_FLAGS= \
|
||||
--enable-maintainer-mode \
|
||||
--enable-minimal=com,remoting,shared_perfcounters \
|
||||
--with-tls=pthread \
|
||||
--without-ikvm-native
|
||||
--without-ikvm-native \
|
||||
$$(ios-$(1)_CONFIGURE_FLAGS)
|
||||
|
||||
# _ios_$(1)_CONFIGURE_FLAGS += --enable-extension-module=xamarin
|
||||
# _ios-$(1)_CONFIGURE_FLAGS += --enable-extension-module=xamarin
|
||||
|
||||
.stamp-ios-$(1)-toolchain:
|
||||
touch $$@
|
||||
|
||||
.stamp-ios-$(1)-configure: $$(TOP)/configure
|
||||
mkdir -p $$(TOP)/sdks/builds/ios-$(1)
|
||||
cd $$(TOP)/sdks/builds/ios-$(1) && PATH="$$(PLATFORM_BIN):$$$$PATH" $$(TOP)/configure $$(_ios_$(1)_AC_VARS) $$(_ios_$(1)_CONFIGURE_ENVIRONMENT) $$(_ios_$(1)_CONFIGURE_FLAGS)
|
||||
touch $$@
|
||||
|
||||
.PHONY: package-ios-$(1)
|
||||
package-ios-$(1):
|
||||
$(MAKE) -C $$(TOP)/sdks/builds/ios-$(1)/mono install
|
||||
$(MAKE) -C $$(TOP)/sdks/builds/ios-$(1)/support install
|
||||
|
||||
.PHONY: clean-ios-$(1)
|
||||
clean-ios-$(1):
|
||||
rm -rf .stamp-ios-$(1)-toolchain .stamp-ios-$(1)-configure $$(TOP)/sdks/builds/ios-$(1) $$(TOP)/sdks/builds/ios-$(1).config.cache $$(TOP)/sdks/out/ios-$(1)
|
||||
|
||||
TARGETS += ios-$(1)
|
||||
$$(eval $$(call RuntimeTemplate,ios-$(1)))
|
||||
|
||||
endef
|
||||
|
||||
ios_sim_sysroot = -isysroot $(XCODE_DIR)/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator$(IOS_VERSION).sdk -mios-simulator-version-min=$(IOS_VERSION_MIN)
|
||||
tvos_sim_sysroot = -isysroot $(XCODE_DIR)/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator$(TVOS_VERSION).sdk -mtvos-simulator-version-min=$(TVOS_VERSION_MIN)
|
||||
watchos_sim_sysroot = -isysroot $(XCODE_DIR)/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator$(WATCH_VERSION).sdk -mwatchos-simulator-version-min=$(WATCHOS_VERSION_MIN)
|
||||
|
||||
ios-sim32_SYSROOT = $(ios_sim_sysroot)
|
||||
ios-sim64_SYSROOT = $(ios_sim_sysroot)
|
||||
ios-simtv_SYSROOT = $(tvos_sim_sysroot)
|
||||
ios-simwatch_SYSROOT = $(watchos_sim_sysroot)
|
||||
|
||||
ios-simwatch_CONFIGURE_FLAGS = --with-cooperative-gc=yes
|
||||
|
||||
ios-sim32_CPPFLAGS = -DHOST_IOS
|
||||
ios-sim64_CPPFLAGS = -DHOST_IOS
|
||||
ios-simtv_CPPFLAGS = -DHOST_APPLETVOS -DTARGET_APPLETVOS
|
||||
ios-simwatch_CPPFLAGS = -DHOST_IOS -DHOST_WATCHOS
|
||||
|
||||
ios-simtv_AC_VARS = \
|
||||
ac_cv_func_pthread_kill=no \
|
||||
ac_cv_func_kill=no \
|
||||
ac_cv_func_sigaction=no \
|
||||
ac_cv_func_fork=no \
|
||||
ac_cv_func_execv=no \
|
||||
ac_cv_func_execve=no \
|
||||
ac_cv_func_execvp=no \
|
||||
ac_cv_func_signal=no
|
||||
ios-simwatch_AC_VARS = \
|
||||
ac_cv_func_system=no \
|
||||
ac_cv_func_pthread_kill=no \
|
||||
ac_cv_func_kill=no \
|
||||
ac_cv_func_sigaction=no \
|
||||
ac_cv_func_fork=no \
|
||||
ac_cv_func_execv=no \
|
||||
ac_cv_func_execve=no \
|
||||
ac_cv_func_execvp=no \
|
||||
ac_cv_func_signal=no
|
||||
|
||||
$(eval $(call iOSSimulatorTemplate,sim32,i386))
|
||||
$(eval $(call iOSSimulatorTemplate,sim64,x86_64))
|
||||
$(eval $(call iOSSimulatorTemplate,simtv,x86_64))
|
||||
$(eval $(call iOSSimulatorTemplate,simwatch,i386))
|
||||
|
||||
$(TOP)/tools/offsets-tool/MonoAotOffsetsDumper.exe: $(wildcard $(TOP)/tools/offsets-tool/*.cs)
|
||||
$(MAKE) -C $(dir $@) MonoAotOffsetsDumper.exe
|
||||
|
||||
LLVM_REV=3b82b3c9041eb997f627f881a67d20be37264e9c
|
||||
ifndef IGNORE_PACKAGE_LLVM
|
||||
|
||||
# Download a prebuilt llvm
|
||||
.stamp-ios-llvm-$(LLVM_REV):
|
||||
./download-llvm.sh $(LLVM_REV)
|
||||
.stamp-ios-llvm-$(LLVM_HASH):
|
||||
./download-llvm.sh $(LLVM_HASH)
|
||||
touch $@
|
||||
|
||||
build-ios-llvm: .stamp-ios-llvm-$(LLVM_REV)
|
||||
build-ios-llvm: .stamp-ios-llvm-$(LLVM_HASH)
|
||||
|
||||
clean-ios-llvm:
|
||||
$(RM) -rf ../out/ios-llvm64 ../out/ios-llvm32 .stamp-ios-llvm-$(LLVM_REV)
|
||||
$(RM) -rf ../out/ios-llvm64 ../out/ios-llvm32 .stamp-ios-llvm-$(LLVM_HASH)
|
||||
|
||||
else
|
||||
|
||||
build-ios-llvm: package-llvm-llvm64 package-llvm-llvm32
|
||||
ln -sf ../out/llvm-llvm32 ../out/ios-llvm32
|
||||
ln -sf ../out/llvm-llvm64 ../out/ios-llvm64
|
||||
|
||||
clean-ios-llvm: clean-llvm-llvm64 clean-llvm-llvm32
|
||||
$(RM) -rf ../out/{ios-llvm32,ios-llvm64}
|
||||
|
||||
endif
|
||||
|
||||
##
|
||||
# Parameters:
|
||||
@@ -324,44 +329,46 @@ clean-ios-llvm:
|
||||
# $(5): offsets tool --abi argument
|
||||
#
|
||||
# Flags:
|
||||
# ios_$(1)_AC_VARS
|
||||
# ios_$(1)_CFLAGS
|
||||
# ios_$(1)_CXXFLAGS
|
||||
# ios_$(1)_LDFLAGS
|
||||
# ios_$(1)_CONFIGURE_FLAGS
|
||||
# ios-$(1)_AC_VARS
|
||||
# ios-$(1)_CFLAGS
|
||||
# ios-$(1)_CXXFLAGS
|
||||
# ios-$(1)_LDFLAGS
|
||||
# ios-$(1)_CONFIGURE_FLAGS
|
||||
define iOSCrossTemplate
|
||||
|
||||
_ios_$(1)_OFFSET_TOOL_ABI=$(5)
|
||||
_ios-$(1)_OFFSET_TOOL_ABI=$(5)
|
||||
|
||||
_ios_$(1)_CC=$$(CCACHE) $$(PLATFORM_BIN)/clang
|
||||
_ios_$(1)_CXX=$$(CCACHE) $$(PLATFORM_BIN)/clang++
|
||||
_ios-$(1)_CC=$$(CCACHE) $$(PLATFORM_BIN)/clang
|
||||
_ios-$(1)_CXX=$$(CCACHE) $$(PLATFORM_BIN)/clang++
|
||||
|
||||
_ios_$(1)_AC_VARS= \
|
||||
$$(ios_$(1)_AC_VARS)
|
||||
_ios-$(1)_AC_VARS= \
|
||||
$$(ios-$(1)_AC_VARS)
|
||||
|
||||
_ios_$(1)_CFLAGS= \
|
||||
$$(ios_CFLAGS) \
|
||||
_ios-$(1)_CFLAGS= \
|
||||
-isysroot $$(XCODE_DIR)/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$$(MACOS_VERSION).sdk -mmacosx-version-min=$$(MACOS_VERSION_MIN) \
|
||||
-Qunused-arguments \
|
||||
$$(ios_$(1)_CFLAGS)
|
||||
$$(ios-$(1)_CFLAGS)
|
||||
|
||||
_ios_$(1)_CXXFLAGS= \
|
||||
$$(ios_CXXFLAGS) \
|
||||
_ios-$(1)_CXXFLAGS= \
|
||||
-isysroot $$(XCODE_DIR)/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$$(MACOS_VERSION).sdk -mmacosx-version-min=$$(MACOS_VERSION_MIN) \
|
||||
-Qunused-arguments \
|
||||
-stdlib=libc++ \
|
||||
$$(ios_$(1)_CXXFLAGS)
|
||||
$$(ios-$(1)_CXXFLAGS)
|
||||
|
||||
_ios_$(1)_LDFLAGS= \
|
||||
_ios-$(1)_CPPFLAGS= \
|
||||
-DMONOTOUCH=1 \
|
||||
$$(ios-$(1)_CPPFLAGS)
|
||||
|
||||
_ios-$(1)_LDFLAGS= \
|
||||
$$(ios_LDFLAGS) \
|
||||
-stdlib=libc++ \
|
||||
$$(ios_$(1)_LDFLAGS)
|
||||
$$(ios-$(1)_LDFLAGS)
|
||||
|
||||
_ios_$(1)_CONFIGURE_FLAGS= \
|
||||
$$(ios_$(1)_CONFIGURE_FLAGS) \
|
||||
_ios-$(1)_CONFIGURE_FLAGS= \
|
||||
$$(ios-$(1)_CONFIGURE_FLAGS) \
|
||||
--target=$(4) \
|
||||
--cache-file=$$(TOP)/sdks/builds/ios-$(1).config.cache \
|
||||
--prefix=$$(TOP)/sdks/out/ios-$(1) \
|
||||
--cache-file=$$(TOP)/sdks/builds/ios-$(1)-$$(CONFIGURATION).config.cache \
|
||||
--prefix=$$(TOP)/sdks/out/ios-$(1)-$$(CONFIGURATION) \
|
||||
--disable-boehm \
|
||||
--disable-btls \
|
||||
--disable-iconv \
|
||||
@@ -374,45 +381,25 @@ _ios_$(1)_CONFIGURE_FLAGS= \
|
||||
--with-cross-offsets=$(4).h \
|
||||
--with-llvm=$$(TOP)/sdks/out/ios-$(3)
|
||||
|
||||
_ios_$(1)_CONFIGURE_ENVIRONMENT= \
|
||||
CC="$$(_ios_$(1)_CC)" \
|
||||
CXX="$$(_ios_$(1)_CXX)" \
|
||||
CFLAGS="$$(_ios_$(1)_CFLAGS)" \
|
||||
CXXFLAGS="$$(_ios_$(1)_CXXFLAGS)" \
|
||||
LDFLAGS="$$(_ios_$(1)_LDFLAGS)"
|
||||
|
||||
.stamp-ios-$(1)-toolchain:
|
||||
touch $$@
|
||||
|
||||
.stamp-ios-$(1)-configure: $$(TOP)/configure | build-ios-llvm
|
||||
mkdir -p $$(TOP)/sdks/builds/ios-$(1)
|
||||
cd $$(TOP)/sdks/builds/ios-$(1) && PATH="$$(PLATFORM_BIN):$$$$PATH" $$(TOP)/configure $$(_ios_$(1)_AC_VARS) $$(_ios_$(1)_CONFIGURE_ENVIRONMENT) $$(_ios_$(1)_CONFIGURE_FLAGS)
|
||||
touch $$@
|
||||
.stamp-ios-$(1)-$$(CONFIGURATION)-configure: | build-ios-llvm
|
||||
|
||||
$$(TOP)/sdks/builds/ios-$(1)/$(4).h: .stamp-ios-$(1)-configure $$(TOP)/tools/offsets-tool/MonoAotOffsetsDumper.exe
|
||||
cd $$(TOP)/sdks/builds/ios-$(1) && \
|
||||
$$(TOP)/sdks/builds/ios-$(1)-$$(CONFIGURATION)/$(4).h: .stamp-ios-$(1)-$$(CONFIGURATION)-configure $$(TOP)/tools/offsets-tool/MonoAotOffsetsDumper.exe
|
||||
cd $$(TOP)/sdks/builds/ios-$(1)-$$(CONFIGURATION) && \
|
||||
MONO_PATH=$(TOP)/tools/offsets-tool/CppSharp/osx_32 \
|
||||
mono --arch=32 --debug $$(TOP)/tools/offsets-tool/MonoAotOffsetsDumper.exe \
|
||||
--gen-ios --abi $$(_ios_$(1)_OFFSET_TOOL_ABI) --outfile $$@ --mono $$(TOP) --targetdir $$(TOP)/sdks/builds/ios-$(1)
|
||||
--gen-ios --abi $$(_ios-$(1)_OFFSET_TOOL_ABI) --outfile $$@ --mono $$(TOP) --targetdir $$(TOP)/sdks/builds/ios-$(1)-$$(CONFIGURATION)
|
||||
|
||||
build-ios-$(1): $$(TOP)/sdks/builds/ios-$(1)/$(4).h
|
||||
build-ios-$(1): $$(TOP)/sdks/builds/ios-$(1)-$$(CONFIGURATION)/$(4).h
|
||||
|
||||
.PHONY: package-ios-$(1)
|
||||
package-ios-$(1):
|
||||
$$(MAKE) -C $$(TOP)/sdks/builds/ios-$(1)/mono install
|
||||
|
||||
.PHONY: clean-ios-$(1)
|
||||
clean-ios-$(1):
|
||||
rm -rf .stamp-ios-$(1)-toolchain .stamp-ios-$(1)-configure $$(TOP)/sdks/builds/ios-$(1) $$(TOP)/sdks/builds/ios-$(1).config.cache $$(TOP)/sdks/out/ios-$(1)
|
||||
|
||||
TARGETS += ios-$(1)
|
||||
$$(eval $$(call RuntimeTemplate,ios-$(1)))
|
||||
|
||||
endef
|
||||
|
||||
ios_cross32_CONFIGURE_FLAGS=--build=i386-apple-darwin10
|
||||
ios_crosswatch_CONFIGURE_FLAGS=--build=i386-apple-darwin10 --with-cooperative-gc=yes
|
||||
ios-cross32_CONFIGURE_FLAGS=--build=i386-apple-darwin10
|
||||
ios-crosswatch_CONFIGURE_FLAGS=--build=i386-apple-darwin10 --with-cooperative-gc=yes
|
||||
$(eval $(call iOSCrossTemplate,cross32,arm,llvm32,arm-darwin,arm-apple-darwin10))
|
||||
$(eval $(call iOSCrossTemplate,cross64,aarch64,llvm64,aarch64-darwin,aarch64-apple-darwin10))
|
||||
$(eval $(call iOSCrossTemplate,crosswatch,armv7k,llvm32,armv7k-unknown-darwin,armv7k-apple-darwin))
|
||||
|
||||
configure-mono: $(TOP)/configure
|
||||
+25
-22
@@ -1,8 +1,11 @@
|
||||
|
||||
LLVM_SRC?=$(TOP)/sdks/builds/toolchains/llvm
|
||||
|
||||
$(TOP)/sdks/builds/toolchains/llvm:
|
||||
git clone -b master https://github.com/mono/llvm.git $@
|
||||
cd $@ && git checkout $(LLVM_HASH)
|
||||
|
||||
$(TOP)/sdks/builds/toolchains/llvm/configure: | $(TOP)/sdks/builds/toolchains/llvm
|
||||
$(LLVM_SRC)/configure: | $(LLVM_SRC)
|
||||
|
||||
##
|
||||
# Parameters
|
||||
@@ -11,29 +14,28 @@ $(TOP)/sdks/builds/toolchains/llvm/configure: | $(TOP)/sdks/builds/toolchains/ll
|
||||
define LLVMTemplate
|
||||
|
||||
_llvm_$(1)_CXXFLAGS= \
|
||||
-stdlib=libc++ \
|
||||
-mmacosx-version-min=10.9
|
||||
$$(if $$(filter $$(UNAME),Darwin),-mmacosx-version-min=10.9 -stdlib=libc++)
|
||||
|
||||
_llvm_$(1)_LDFLAGS= \
|
||||
-mmacosx-version-min=10.9
|
||||
$$(if $$(filter $$(UNAME),Darwin),-mmacosx-version-min=10.9)
|
||||
|
||||
_llvm_$(1)_CONFIGURE_ENVIRONMENT= \
|
||||
CXXFLAGS="$$(_llvm_$(1)_CXXFLAGS)" \
|
||||
LDFLAGS="$$(_llvm_$(1)_LDFLAGS)"
|
||||
|
||||
_llvm_$(1)_CONFIGURE_FLAGS= \
|
||||
--host=$(2)-apple-darwin10 \
|
||||
--build=$$(if $$(filter $$(UNAME),Darwin),$(2)-apple-darwin10,$$(if $$(filter $$(UNAME),Linux),x86_64-linux-gnu,$$(error "Unknown UNAME='$$(UNAME)'"))) \
|
||||
--cache-file=$$(TOP)/sdks/builds/llvm-$(1).config.cache \
|
||||
--prefix=$$(TOP)/sdks/out/llvm-$(1) \
|
||||
--enable-assertions=no \
|
||||
--enable-optimized \
|
||||
--enable-targets="arm,aarch64,x86" \
|
||||
--enable-libcpp
|
||||
$$(if $$(filter $$(UNAME),Darwin),--enable-libcpp)
|
||||
|
||||
.stamp-llvm-$(1)-toolchain: | $$(TOP)/sdks/builds/toolchains/llvm
|
||||
.stamp-llvm-$(1)-toolchain: | $$(LLVM_SRC)
|
||||
touch $$@
|
||||
|
||||
.stamp-llvm-$(1)-configure: $$(TOP)/sdks/builds/toolchains/llvm/configure
|
||||
.stamp-llvm-$(1)-configure: $$(LLVM_SRC)/configure
|
||||
mkdir -p $$(TOP)/sdks/builds/llvm-$(1)
|
||||
cd $$(TOP)/sdks/builds/llvm-$(1) && $$< $$(_llvm_$(1)_CONFIGURE_ENVIRONMENT) $$(_llvm_$(1)_CONFIGURE_FLAGS)
|
||||
touch $$@
|
||||
@@ -62,17 +64,17 @@ $(eval $(call LLVMTemplate,llvm64,x86_64))
|
||||
# llvm_$(1)_CONFIGURE_ENVIRONMENT
|
||||
define LLVMMxeTemplate
|
||||
|
||||
_llvm_$(1)_PATH=$$(TOP)/sdks/out/mxe/bin
|
||||
_llvm_$(1)_PATH=$$(MXE_PREFIX)/bin
|
||||
|
||||
_llvm_$(1)_AR=$$(TOP)/sdks/out/mxe/bin/$(2)-w64-mingw32.static-ar
|
||||
_llvm_$(1)_AS=$$(TOP)/sdks/out/mxe/bin/$(2)-w64-mingw32.static-as
|
||||
_llvm_$(1)_CC=$$(TOP)/sdks/out/mxe/bin/$(2)-w64-mingw32.static-gcc
|
||||
_llvm_$(1)_CXX=$$(TOP)/sdks/out/mxe/bin/$(2)-w64-mingw32.static-g++
|
||||
_llvm_$(1)_DLLTOOL=$$(TOP)/sdks/out/mxe/bin/$(2)-w64-mingw32.static-dlltool
|
||||
_llvm_$(1)_LD=$$(TOP)/sdks/out/mxe/bin/$(2)-w64-mingw32.static-ld
|
||||
_llvm_$(1)_OBJDUMP=$$(TOP)/sdks/out/mxe/bin/$(2)-w64-mingw32.static-objdump
|
||||
_llvm_$(1)_RANLIB=$$(TOP)/sdks/out/mxe/bin/$(2)-w64-mingw32.static-ranlib
|
||||
_llvm_$(1)_STRIP=$$(TOP)/sdks/out/mxe/bin/$(2)-w64-mingw32.static-strip
|
||||
_llvm_$(1)_AR=$$(MXE_PREFIX)/bin/$(2)-w64-mingw32$$(if $$(filter $(UNAME),Darwin),.static)-ar
|
||||
_llvm_$(1)_AS=$$(MXE_PREFIX)/bin/$(2)-w64-mingw32$$(if $$(filter $(UNAME),Darwin),.static)-as
|
||||
_llvm_$(1)_CC=$$(MXE_PREFIX)/bin/$(2)-w64-mingw32$$(if $$(filter $(UNAME),Darwin),.static)-gcc
|
||||
_llvm_$(1)_CXX=$$(MXE_PREFIX)/bin/$(2)-w64-mingw32$$(if $$(filter $(UNAME),Darwin),.static)-g++
|
||||
_llvm_$(1)_DLLTOOL=$$(MXE_PREFIX)/bin/$(2)-w64-mingw32$$(if $$(filter $(UNAME),Darwin),.static)-dlltool
|
||||
_llvm_$(1)_LD=$$(MXE_PREFIX)/bin/$(2)-w64-mingw32$$(if $$(filter $(UNAME),Darwin),.static)-ld
|
||||
_llvm_$(1)_OBJDUMP=$$(MXE_PREFIX)/bin/$(2)-w64-mingw32$$(if $$(filter $(UNAME),Darwin),.static)-objdump
|
||||
_llvm_$(1)_RANLIB=$$(MXE_PREFIX)/bin/$(2)-w64-mingw32$$(if $$(filter $(UNAME),Darwin),.static)-ranlib
|
||||
_llvm_$(1)_STRIP=$$(MXE_PREFIX)/bin/$(2)-w64-mingw32$$(if $$(filter $(UNAME),Darwin),.static)-strip
|
||||
|
||||
_llvm_$(1)_CXXFLAGS=
|
||||
|
||||
@@ -92,7 +94,7 @@ _llvm_$(1)_CONFIGURE_ENVIRONMENT = \
|
||||
LDFLAGS="$$(_llvm_$(1)_LDFLAGS)"
|
||||
|
||||
_llvm_$(1)_CONFIGURE_FLAGS = \
|
||||
--host=$(2)-w64-mingw32.static \
|
||||
--host=$(2)-w64-mingw32$$(if $$(filter $(UNAME),Darwin),.static) \
|
||||
--cache-file=$$(TOP)/sdks/builds/llvm-$(1).config.cache \
|
||||
--prefix=$$(TOP)/sdks/out/llvm-$(1) \
|
||||
--enable-assertions=no \
|
||||
@@ -101,11 +103,10 @@ _llvm_$(1)_CONFIGURE_FLAGS = \
|
||||
--disable-pthreads \
|
||||
--disable-zlib
|
||||
|
||||
.stamp-llvm-$(1)-toolchain: | $$(TOP)/sdks/builds/toolchains/llvm
|
||||
cd $$(TOP)/sdks/builds/toolchains/llvm && git checkout $(LLVM_HASH)
|
||||
.stamp-llvm-$(1)-toolchain: | $$(LLVM_SRC)
|
||||
touch $$@
|
||||
|
||||
.stamp-llvm-$(1)-configure: $$(TOP)/sdks/builds/toolchains/llvm/configure | package-mxe
|
||||
.stamp-llvm-$(1)-configure: $$(LLVM_SRC)/configure | $(if $(IGNORE_PROVISION_MXE),,provision-mxe)
|
||||
mkdir -p $$(TOP)/sdks/builds/llvm-$(1)
|
||||
cd $$(TOP)/sdks/builds/llvm-$(1) && PATH="$$$$PATH:$$(_llvm_$(1)_PATH)" $$< $$(_llvm_$(1)_CONFIGURE_ENVIRONMENT) $$(_llvm_$(1)_CONFIGURE_FLAGS)
|
||||
touch $$@
|
||||
@@ -122,5 +123,7 @@ TARGETS += llvm-$(1)
|
||||
|
||||
endef
|
||||
|
||||
ifneq ($(MXE_PREFIX),)
|
||||
$(eval $(call LLVMMxeTemplate,llvmwin32,i686))
|
||||
$(eval $(call LLVMMxeTemplate,llvmwin64,x86_64))
|
||||
endif
|
||||
+15
-28
@@ -1,32 +1,19 @@
|
||||
|
||||
$(TOP)/sdks/builds/toolchains/mxe:
|
||||
git clone -b xamarin https://github.com/xamarin/mxe.git $@
|
||||
MXE_SRC?=$(TOP)/sdks/builds/toolchains/mxe
|
||||
MXE_PREFIX_DIR?=$(TOP)/sdks/out
|
||||
|
||||
.stamp-mxe-toolchain: | $(TOP)/sdks/builds/toolchains/mxe
|
||||
cd $(TOP)/sdks/builds/toolchains/mxe && git checkout $(MXE_HASH)
|
||||
# This is not overridable
|
||||
MXE_PREFIX:=$(MXE_PREFIX_DIR)/mxe-$(shell echo $(MXE_HASH) | head -c 7)
|
||||
|
||||
$(MXE_SRC)/Makefile:
|
||||
git clone -b xamarin https://github.com/xamarin/mxe.git $(dir $@)
|
||||
cd $(dir $@) && git checkout $(MXE_HASH)
|
||||
|
||||
$(MXE_PREFIX)/.stamp: $(MXE_SRC)/Makefile
|
||||
$(MAKE) -C $(MXE_SRC) gcc cmake zlib pthreads dlfcn-win32 mman-win32 \
|
||||
PREFIX="$(MXE_PREFIX)" MXE_TARGETS="i686-w64-mingw32.static x86_64-w64-mingw32.static" \
|
||||
OS_SHORT_NAME="disable-native-plugins" PATH="$$PATH:$(MXE_PREFIX)/bin:$(dir $(shell brew list gettext | grep bin/autopoint$))"
|
||||
touch $@
|
||||
|
||||
.stamp-mxe-configure:
|
||||
touch $@
|
||||
|
||||
.PHONY: build-custom-mxe
|
||||
build-custom-mxe:
|
||||
PATH="$$PATH:$(dir $(shell which autopoint))" $(MAKE) -C $(TOP)/sdks/builds/toolchains/mxe gcc cmake zlib pthreads dlfcn-win32 mman-win32 \
|
||||
MXE_TARGETS="i686-w64-mingw32.static" PREFIX="$(TOP)/sdks/out/mxe" OS_SHORT_NAME="disable-native-plugins"
|
||||
PATH="$$PATH:$(dir $(shell which autopoint))" $(MAKE) -C $(TOP)/sdks/builds/toolchains/mxe gcc cmake zlib pthreads dlfcn-win32 mman-win32 \
|
||||
MXE_TARGETS="x86_64-w64-mingw32.static" PREFIX="$(TOP)/sdks/out/mxe" OS_SHORT_NAME="disable-native-plugins"
|
||||
|
||||
.PHONY: setup-custom-mxe
|
||||
setup-custom-mxe:
|
||||
|
||||
.PHONY: package-mxe
|
||||
package-mxe:
|
||||
|
||||
.PHONY: clean-mxe
|
||||
clean-mxe:
|
||||
$(MAKE) -C $(TOP)/sdks/builds/toolchains/mxe clean \
|
||||
MXE_TARGETS="i686-w64-mingw32.static" PREFIX="$(TOP)/sdks/out/mxe"
|
||||
$(MAKE) -C $(TOP)/sdks/builds/toolchains/mxe clean \
|
||||
MXE_TARGETS="x86_64-w64-mingw32.static" PREFIX="$(TOP)/sdks/out/mxe"
|
||||
|
||||
TARGETS += mxe
|
||||
.PHONY: provision-mxe
|
||||
provision-mxe: $(MXE_PREFIX)/.stamp
|
||||
@@ -0,0 +1,86 @@
|
||||
|
||||
##
|
||||
# Parameters:
|
||||
# $(1): target
|
||||
#
|
||||
# Flags:
|
||||
# _$(1)_AR
|
||||
# _$(1)_AS
|
||||
# _$(1)_CC
|
||||
# _$(1)_CPP
|
||||
# _$(1)_CXX
|
||||
# _$(1)_CXXCPP
|
||||
# _$(1)_DLLTOOL
|
||||
# _$(1)_LD
|
||||
# _$(1)_OBJDUMP
|
||||
# _$(1)_RANLIB
|
||||
# _$(1)_STRIP
|
||||
# _$(1)_CFLAGS
|
||||
# _$(1)_CXXFLAGS
|
||||
# _$(1)_CPPFLAGS
|
||||
# _$(1)_LDFLAGS
|
||||
# _$(1)_AC_VARS
|
||||
# _$(1)_CONFIGURE_FLAGS
|
||||
# _$(1)_PATH
|
||||
define RuntimeTemplate
|
||||
|
||||
__$(1)_CFLAGS=$(if $(RELEASE),-O2 -g,-O0 -ggdb3 -fno-omit-frame-pointer) $$(_$(1)_CFLAGS)
|
||||
__$(1)_CXXFLAGS=$(if $(RELEASE),-O2 -g,-O0 -ggdb3 -fno-omit-frame-pointer) $$(_$(1)_CXXFLAGS)
|
||||
__$(1)_CPPFLAGS=$(if $(RELEASE),-O2 -g,-O0 -ggdb3 -fno-omit-frame-pointer) $$(_$(1)_CPPFLAGS)
|
||||
__$(1)_CXXCPPFLAGS=$(if $(RELEASE),-O2 -g,-O0 -ggdb3 -fno-omit-frame-pointer) $$(_$(1)_CXXCPPFLAGS)
|
||||
|
||||
__$(1)_CONFIGURE_ENVIRONMENT = \
|
||||
$(if $$(_$(1)_AR),AR="$$(_$(1)_AR)") \
|
||||
$(if $$(_$(1)_AS),AS="$$(_$(1)_AS)") \
|
||||
$(if $$(_$(1)_CC),CC="$$(_$(1)_CC)") \
|
||||
$(if $$(_$(1)_CPP),CPP="$$(_$(1)_CPP)") \
|
||||
$(if $$(_$(1)_CXX),CXX="$$(_$(1)_CXX)") \
|
||||
$(if $$(_$(1)_CXXCPP),CXXCPP="$$(_$(1)_CXXCPP)") \
|
||||
$(if $$(_$(1)_DLLTOOL),DLLTOOL="$$(_$(1)_DLLTOOL)") \
|
||||
$(if $$(_$(1)_LD),LD="$$(_$(1)_LD)") \
|
||||
$(if $$(_$(1)_OBJDUMP),OBJDUMP="$$(_$(1)_OBJDUMP)") \
|
||||
$(if $$(_$(1)_RANLIB),RANLIB="$$(_$(1)_RANLIB)") \
|
||||
$(if $$(_$(1)_STRIP),STRIP="$$(_$(1)_STRIP)") \
|
||||
CFLAGS="$$(__$(1)_CFLAGS)" \
|
||||
CXXFLAGS="$$(__$(1)_CXXFLAGS)" \
|
||||
CPPFLAGS="$$(__$(1)_CPPFLAGS)" \
|
||||
CXXCPPFLAGS="$$(__$(1)_CXXCPPFLAGS)" \
|
||||
$(if $$(_$(1)_LDFLAGS),LDFLAGS="$$(_$(1)_LDFLAGS)") \
|
||||
$$(_$(1)_CONFIGURE_ENVIRONMENT)
|
||||
|
||||
.stamp-$(1)-$$(CONFIGURATION)-configure: $$(TOP)/configure .stamp-$(1)-toolchain
|
||||
mkdir -p $$(TOP)/sdks/builds/$(1)-$$(CONFIGURATION)
|
||||
cd $$(TOP)/sdks/builds/$(1)-$$(CONFIGURATION) && $(if $$(_$(1)_PATH),PATH="$$$$PATH:$$(_$(1)_PATH)") $$(TOP)/configure $$(_$(1)_AC_VARS) $$(__$(1)_CONFIGURE_ENVIRONMENT) $$(_$(1)_CONFIGURE_FLAGS)
|
||||
touch $$@
|
||||
|
||||
.PHONY: .stamp-$(1)-configure
|
||||
.stamp-$(1)-configure: .stamp-$(1)-$$(CONFIGURATION)-configure
|
||||
|
||||
.PHONY: build-custom-$(1)
|
||||
build-custom-$(1):
|
||||
$$(MAKE) -C $(1)-$$(CONFIGURATION)
|
||||
|
||||
.PHONY: setup-custom-$(1)
|
||||
setup-custom-$(1):
|
||||
mkdir -p $$(TOP)/sdks/out/$(1)-$$(CONFIGURATION)
|
||||
|
||||
.PHONY: package-$(1)-$$(CONFIGURATION)
|
||||
package-$(1)-$$(CONFIGURATION):
|
||||
$$(MAKE) -C $$(TOP)/sdks/builds/$(1)-$$(CONFIGURATION)/mono install
|
||||
$$(MAKE) -C $$(TOP)/sdks/builds/$(1)-$$(CONFIGURATION)/support install
|
||||
|
||||
.PHONY: package-$(1)
|
||||
package-$(1):
|
||||
$$(MAKE) package-$(1)-$$(CONFIGURATION)
|
||||
|
||||
.PHONY: clean-$(1)-$$(CONFIGURATION)
|
||||
clean-$(1)-$$(CONFIGURATION):
|
||||
rm -rf .stamp-$(1)-toolchain .stamp-$(1)-$$(CONFIGURATION)-configure $$(TOP)/sdks/builds/toolchains/$(1) $$(TOP)/sdks/builds/$(1)-$$(CONFIGURATION) $$(TOP)/sdks/builds/$(1)-$$(CONFIGURATION).config.cache $$(TOP)/sdks/out/$(1)-$$(CONFIGURATION)
|
||||
|
||||
.PHONY: clean-$(1)
|
||||
clean-$(1):
|
||||
$$(MAKE) clean-$(1)-$$(CONFIGURATION)
|
||||
|
||||
TARGETS += $(1)
|
||||
|
||||
endef
|
||||
Executable
+34
@@ -0,0 +1,34 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -xe
|
||||
|
||||
function cleanup()
|
||||
{
|
||||
if [ -n "$ARCHIVE_TEMP_DIR" ]; then
|
||||
rm -rf "$ARCHIVE_TEMP_DIR"
|
||||
fi
|
||||
}
|
||||
|
||||
trap cleanup 0
|
||||
|
||||
## Parameters:
|
||||
# $1: path to source archive
|
||||
# $2: destination directory
|
||||
|
||||
# This weird syntax is necessary because some zip archives do not contain a separate
|
||||
# entry for the root directory but merely a collection of its subdirectories (for instance
|
||||
# platform-tools). The very first entry in the archive is retrieved, then its path is read and
|
||||
# finally the part up to the first '/' of the path is retrieved as the root directory of
|
||||
# the archive. With platform-tools the last part is necessary because otherwise the root directory
|
||||
# would end up being reported as `platform-tools/adb` as this is the first entry in the archive and
|
||||
# there's no `platform-tools/` entry
|
||||
ZIP_ROOT_DIR=$(unzip -qql "$1" | head -n1 | tr -s ' ' | cut -d' ' -f5- | tr '/' ' ' | cut -d' ' -f1)
|
||||
|
||||
# We need a temporary directory because some archives (emulator) have their root directory named the
|
||||
# same as a file/directory inside it (emulator has emulator/emulator executable for instance) and
|
||||
# moving such a file/directory to .. wouldn't work
|
||||
ARCHIVE_TEMP_DIR=$(mktemp -d unzip_android_archive_XXXXXXXX)
|
||||
|
||||
unzip "$1" -d "$ARCHIVE_TEMP_DIR"
|
||||
mkdir -p "$2"
|
||||
find "$ARCHIVE_TEMP_DIR/$ZIP_ROOT_DIR/" -maxdepth 1 -not \( -name "$ZIP_ROOT_DIR" -and -type d \) -and -not -name . -and -not -name .. -exec mv -f '{}' "$2" ';'
|
||||
@@ -1,42 +1,3 @@
|
||||
MAKEFLAGS += --no-builtin-rules
|
||||
|
||||
-include $(TOP)/sdks/Make.config
|
||||
|
||||
ifndef DISABLE_ANDROID
|
||||
|
||||
CheckSdkDir=$(or $(and $(wildcard $(1)/tools),$(wildcard $(1)/platform-tools)),$(warning Could not find Android SDK in "$(1)"))
|
||||
|
||||
ifneq ($(call CheckSdkDir,$(HOME)/android-toolchain/sdk),)
|
||||
SDK_DIR = $(abspath $(HOME)/android-toolchain/sdk)
|
||||
else
|
||||
ifneq ($(call CheckSdkDir,$(HOME)/Library/Developer/Xamarin/android-sdk-macosx),)
|
||||
SDK_DIR = $(abspath $(HOME)/Library/Developer/Xamarin/android-sdk-macosx)
|
||||
else
|
||||
ifneq ($(call CheckSdkDir,$(HOME)/Library/Developer/Xamarin/android-sdk-mac_x86),)
|
||||
SDK_DIR = $(abspath $(HOME)/Library/Developer/Xamarin/android-sdk-mac_x86)
|
||||
else
|
||||
$(error Could not find Android SDK)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
CheckNdkDir=$(or $(and $(wildcard $(1)/platforms)),$(warning Could not find Android NDK in "$(1)"))
|
||||
|
||||
ifneq ($(call CheckNdkDir,$(HOME)/android-toolchain/ndk),)
|
||||
NDK_DIR=$(abspath $(HOME)/android-toolchain/ndk)
|
||||
else
|
||||
ifneq ($(call CheckNdkDir,$(HOME)/Library/Developer/Xamarin/android-ndk/android-ndk-r14b),)
|
||||
NDK_DIR=$(abspath $(HOME)/Library/Developer/Xamarin/android-ndk/android-ndk-r14b)
|
||||
else
|
||||
ifneq ($(call CheckNdkDir,$(HOME)/Library/Developer/Xamarin/android-sdk-mac_x86/ndk-bundle),)
|
||||
NDK_DIR=$(abspath $(HOME)/Library/Developer/Xamarin/android-sdk-mac_x86/ndk-bundle)
|
||||
else
|
||||
$(error Could not find Android NDK)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
endif # DISABLE_ANDROID
|
||||
|
||||
ifndef DISABLE_IOS
|
||||
|
||||
|
||||
+8
-6
@@ -1,7 +1,7 @@
|
||||
|
||||
# MXE
|
||||
|
||||
MXE_HASH?=a926b16d8e07b6125484223794b412f89b9acce0
|
||||
MXE_HASH?=b9cbb53541a0e10fe4fe81f22bd586cb9cdc922a
|
||||
|
||||
# LLVM
|
||||
|
||||
@@ -9,11 +9,13 @@ LLVM_HASH?=3b82b3c9041eb997f627f881a67d20be37264e9c
|
||||
|
||||
# Android
|
||||
|
||||
ANDROID_PLATFORM_VERSION_armeabi?=14
|
||||
ANDROID_PLATFORM_VERSION_armeabi-v7a?=14
|
||||
ANDROID_PLATFORM_VERSION_arm64-v8a?=21
|
||||
ANDROID_PLATFORM_VERSION_x86?=14
|
||||
ANDROID_PLATFORM_VERSION_x86_64?=21
|
||||
ANDROID_BUILD_TOOLS_VERSION?=27
|
||||
ANDROID_NDK_VERSION?=r14b
|
||||
ANDROID_SDK_VERSION_armeabi?=14
|
||||
ANDROID_SDK_VERSION_armeabi-v7a?=14
|
||||
ANDROID_SDK_VERSION_arm64-v8a?=21
|
||||
ANDROID_SDK_VERSION_x86?=14
|
||||
ANDROID_SDK_VERSION_x86_64?=21
|
||||
|
||||
# iOS
|
||||
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
TOP=$(realpath $(CURDIR)/../..)
|
||||
-include $(TOP)/sdks/Make.config
|
||||
include $(TOP)/sdks/versions.mk
|
||||
include $(TOP)/sdks/paths.mk
|
||||
|
||||
MAKEFLAGS += --no-builtin-rules
|
||||
|
||||
EMCC=source $(TOP)/sdks/builds/toolchains/emsdk/emsdk_env.sh && emcc
|
||||
D8=$(TOP)/sdks/wasm/v8/out.gn/x64.release/d8
|
||||
WASM_BCL_DIR=$(TOP)/sdks/out/bcl/wasm
|
||||
|
||||
@@ -3,9 +3,12 @@ SUPPORT=
|
||||
else
|
||||
SUPPORT=libMonoSupportW.la
|
||||
endif
|
||||
|
||||
if BUILD_SUPPORT
|
||||
lib_LTLIBRARIES = \
|
||||
libMonoPosixHelper.la \
|
||||
$(SUPPORT)
|
||||
endif
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
$(GLIB_CFLAGS) \
|
||||
|
||||
Reference in new issue
Block a user