Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2019-08] Bump msbuild to track mono-2019-10 #24

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1336,7 +1336,7 @@ enable_cooperative_suspend_default=no
enable_hybrid_suspend_default=no

# For the sake of clearer error messages, these numbers should all be different from each other.
INVARIANT_AOT_OPTIONS=nimt-trampolines=2000,ntrampolines=10000,nrgctx-fetch-trampolines=256,ngsharedvt-trampolines=4400,nftnptr-arg-trampolines=4000
INVARIANT_AOT_OPTIONS=nimt-trampolines=2000,ntrampolines=10000,nrgctx-fetch-trampolines=256,ngsharedvt-trampolines=4400,nftnptr-arg-trampolines=4000,nrgctx-trampolines=21000

AOT_BUILD_ATTRS=$INVARIANT_AOT_OPTIONS

Expand Down
3 changes: 1 addition & 2 deletions mcs/build/profiles/monodroid.make
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ NO_CONSOLE = yes

ifdef PLATFORM_WIN32
PROFILE_MCS_FLAGS += -d:MOBILE_DESKTOP_HOST -d:WIN_PLATFORM
else
ENABLE_GSS=1
endif
ENABLE_GSS=1

PROFILE_TEST_HARNESS_EXCLUDES = MobileNotWorking PKITS InetAccess AndroidNotWorking
6 changes: 5 additions & 1 deletion mono/metadata/marshal.c
Original file line number Diff line number Diff line change
Expand Up @@ -2318,7 +2318,11 @@ mono_marshal_get_delegate_invoke (MonoMethod *method, MonoDelegate *del)
sig = mono_signature_no_pinvoke (method);

if (del && !del->target && del->method && mono_method_signature_internal (del->method)->hasthis) {
callvirt = TRUE;
if (!(del->method->flags & METHOD_ATTRIBUTE_VIRTUAL) && !m_class_is_valuetype (del->method->klass) && sig->param_count == mono_method_signature_internal (del->method)->param_count + 1) {
/* The first argument of the delegate is passed as this, the normal invoke code can handle this */
} else {
callvirt = TRUE;
}
target_method = del->method;
}

Expand Down
11 changes: 7 additions & 4 deletions mono/mini/aot-compiler.c
Original file line number Diff line number Diff line change
Expand Up @@ -1127,12 +1127,15 @@ arch_init (MonoAotCompile *acfg)
if (acfg->aot_opts.mtriple && strstr (acfg->aot_opts.mtriple, "darwin")) {
g_string_append (acfg->llc_args, "-mattr=+v6");
} else {
if (!(acfg->aot_opts.mtriple && strstr (acfg->aot_opts.mtriple, "thumb")))
if (!acfg->aot_opts.mtriple) {
g_string_append (acfg->llc_args, " -march=arm");
} else {
/* arch will be defined via mtriple, e.g. armv7s-ios or thumb. */

if (acfg->aot_opts.mtriple && strstr (acfg->aot_opts.mtriple, "ios")) {
g_string_append (acfg->llc_args, " -mattr=+v7");
g_string_append (acfg->llc_args, " -exception-model=dwarf -disable-fp-elim");
if (strstr (acfg->aot_opts.mtriple, "ios")) {
g_string_append (acfg->llc_args, " -mattr=+v7");
g_string_append (acfg->llc_args, " -exception-model=dwarf -disable-fp-elim");
}
}

#if defined(ARM_FPU_VFP_HARD)
Expand Down
12 changes: 7 additions & 5 deletions mono/mini/debugger-agent.c
Original file line number Diff line number Diff line change
Expand Up @@ -2695,11 +2695,13 @@ debugger_interrupt_critical (MonoThreadInfo *info, gpointer user_data)
MonoJitInfo *ji;

data->valid_info = TRUE;
ji = mono_jit_info_table_find_internal (
(MonoDomain *)mono_thread_info_get_suspend_state (info)->unwind_data [MONO_UNWIND_DATA_DOMAIN],
MONO_CONTEXT_GET_IP (&mono_thread_info_get_suspend_state (info)->ctx),
TRUE,
TRUE);
MonoDomain *domain = (MonoDomain *) mono_thread_info_get_suspend_state (info)->unwind_data [MONO_UNWIND_DATA_DOMAIN];
if (!domain) {
/* not attached */
ji = NULL;
} else {
ji = mono_jit_info_table_find_internal ( domain, MONO_CONTEXT_GET_IP (&mono_thread_info_get_suspend_state (info)->ctx), TRUE, TRUE);
}

/* This is signal safe */
thread_interrupt (data->tls, info, ji);
Expand Down
24 changes: 24 additions & 0 deletions mono/mini/gshared.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2192,6 +2192,30 @@ public static int test_0_span () {
var s = new AStruct () { a = 1, b = 2 };
return iface.foo<AStruct> (s);
}

interface IFaceOpenDel {
object AMethod<T> ();
}

class ClassOpenDel : IFaceOpenDel {
public Nullable<int> field;

public Nullable<int> getField () {
return field;
}

public object AMethod<T> () {
var d = (Func<ClassOpenDel, T>)Delegate.CreateDelegate (typeof (Func<ClassOpenDel, T>), typeof (ClassOpenDel).GetMethod ("getField"));
return d (this);
}
}

// Open instance delegate returning a gsharedvt value
public static int test_0_open_delegate () {
IFaceOpenDel iface = new ClassOpenDel () { field = 42 };
var res = (Nullable<int>)iface.AMethod<Nullable<int>> ();
return res == 42 ? 0 : 1;
}
}

// #13191
Expand Down
50 changes: 50 additions & 0 deletions mono/mini/iltests.il
Original file line number Diff line number Diff line change
Expand Up @@ -3182,6 +3182,56 @@ L_3:
ret
}

.method private hidebysig static valuetype [mscorlib]System.Nullable`1<int32> ret_some_vt(int32 val) cil managed
{
.maxstack 8
ldarg.0
newobj instance void valuetype [mscorlib]System.Nullable`1<int32>::.ctor(!0)
ldarg.0
ldc.i4.0
ble.s second_vt

ldarg.0
ldc.i4.s 40
add
newobj instance void valuetype [mscorlib]System.Nullable`1<int32>::.ctor(!0)
pop
ret

second_vt_2:
ldarg.0
ldc.i4.s 30
add
newobj instance void valuetype [mscorlib]System.Nullable`1<int32>::.ctor(!0)
ret

second_vt:
pop
br second_vt_2
}

// https://github.com/mono/mono/issues/17924
.method static public int32 test_0_vt_sp_tracking () cil managed
{
.maxstack 2
.locals init (valuetype [mscorlib]System.Nullable`1<int32> V_0)

ldc.i4.s 10
call valuetype [mscorlib]System.Nullable`1<int32> Tests::ret_some_vt(int32)
stloc.0
ldloca.s V_0
call instance !0 valuetype [mscorlib]System.Nullable`1<int32>::get_Value()
ldc.i4.s 10
bne.un.s wrong

ldc.i4.0
ret

wrong:
ldc.i4.1
ret
}

.method public hidebysig static int32 test_10_rconv_to_u8_ovf_un() cil managed
{
// Code size 20 (0x14)
Expand Down
2 changes: 2 additions & 0 deletions mono/mini/interp/transform.c
Original file line number Diff line number Diff line change
Expand Up @@ -3429,13 +3429,15 @@ generate_code (TransformData *td, MonoMethod *method, MonoMethodHeader *header,
if (ult->type == MONO_TYPE_VOID)
vt_size = -1;
WRITE32_INS (td->last_ins, 0, &vt_size);
POP_VT (td, vt_size);
++td->ip;
} else {
if (vt_size == 0)
SIMPLE_OP(td, ult->type == MONO_TYPE_VOID ? MINT_RET_VOID : MINT_RET);
else {
interp_add_ins (td, MINT_RET_VT);
WRITE32_INS (td->last_ins, 0, &vt_size);
POP_VT (td, vt_size);
++td->ip;
}
}
Expand Down
2 changes: 1 addition & 1 deletion mono/mini/mini-amd64-gsharedvt.c
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ mono_arch_get_gsharedvt_call_info (gpointer addr, MonoMethodSignature *normal_si
if (cinfo->ret.storage == ArgValuetypeAddrInIReg) {
/* Both the caller and the callee pass the vtype ret address in r8 (System V) and RCX or RDX (Windows) */
g_assert (gcinfo->ret.storage == ArgValuetypeAddrInIReg || gcinfo->ret.storage == ArgGsharedvtVariableInReg);
add_to_map (map, map_reg (cinfo->ret.reg), map_reg (cinfo->ret.reg));
add_to_map (map, map_reg (caller_cinfo->ret.reg), map_reg (callee_cinfo->ret.reg));
}

info = mono_domain_alloc0 (mono_domain_get (), sizeof (GSharedVtCallInfo) + (map->len * sizeof (int)));
Expand Down
2 changes: 1 addition & 1 deletion mono/mini/mini-runtime.c
Original file line number Diff line number Diff line change
Expand Up @@ -3557,7 +3557,7 @@ mini_init_delegate (MonoDelegateHandle delegate, MonoError *error)
g_assert (del->method);
/* del->method_ptr might already be set to no_llvmonly_interp_method_pointer if the delegate was created from the interpreter */
del->method_ptr = mini_llvmonly_load_method_delegate (del->method, FALSE, FALSE, &del->extra_arg, error);
} else if (!del->method_ptr && !del->interp_method) {
} else if (!del->method_ptr) {
del->method_ptr = create_delegate_method_ptr (del->method, error);
return_if_nok (error);
}
Expand Down
1 change: 1 addition & 0 deletions mono/native/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ if ENABLE_GSS
macos_sources += $(gss_sources)
linux_sources += $(gss_sources)
ios_sources += $(gss_sources)
android_sources += $(gss_sources)
endif

EXTRA_libmono_native_la_SOURCES = $(common_sources) $(macos_sources) $(ios_sources) $(linux_sources) $(aix_sources) $(freebsd_sources) $(haiku_sources) $(unix_sources) $(gss_sources)
Expand Down
2 changes: 1 addition & 1 deletion packaging/MacSDK/msbuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
class MSBuild (GitHubPackage):
def __init__ (self):
GitHubPackage.__init__ (self, 'mono', 'msbuild', '15', # note: fix scripts/ci/run-test-mac-sdk.sh when bumping the version number
revision = 'cc009fe0d2d158bf10b1a785dac9a4690b09f182')
revision = 'd6694606193835fdd0b96bf81604b05e17bc4a54')

def build (self):
try:
Expand Down
2 changes: 1 addition & 1 deletion packaging/MacSDK/nuget.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
class NuGetBinary (Package):

def __init__(self):
Package.__init__(self, name='NuGet', version='5.3.1', sources=[
Package.__init__(self, name='NuGet', version='5.4.0', sources=[
'https://dist.nuget.org/win-x86-commandline/v%{version}/nuget.exe'])

def build(self):
Expand Down
12 changes: 6 additions & 6 deletions scripts/ci/pipeline/sdks-archive.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,17 @@ parallel (
}
}
},
"iOS (Xcode 11.2)": {
"iOS (Xcode 11.3)": {
throttle(['provisions-ios-toolchain']) {
node ("xcode112") {
archive ("ios", "release", "Darwin", "", "", "", "xcode112")
node ("xcode113") {
archive ("ios", "release", "Darwin", "", "", "", "xcode113")
}
}
},
"Mac (Xcode 11.2)": {
"Mac (Xcode 11.3)": {
throttle(['provisions-mac-toolchain']) {
node ("xcode112") {
archive ("mac", "release", "Darwin", "", "", "", "xcode112")
node ("xcode113") {
archive ("mac", "release", "Darwin", "", "", "", "xcode113")
}
}
},
Expand Down
18 changes: 4 additions & 14 deletions scripts/ci/run-jenkins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -170,20 +170,13 @@ fi
if [[ ${CI_TAGS} == *'sdks-ios'* ]];
then
# configuration on our bots
if [[ ${CI_TAGS} == *'xcode112'* ]]; then
export XCODE_DIR=/Applications/Xcode112.app/Contents/Developer
if [[ ${CI_TAGS} == *'xcode113'* ]]; then
export XCODE_DIR=/Applications/Xcode113.app/Contents/Developer
export MACOS_VERSION=10.15
export IOS_VERSION=13.2
export TVOS_VERSION=13.2
export WATCHOS_VERSION=6.1
export WATCHOS64_32_VERSION=6.1
elif [[ ${CI_TAGS} == *'xcode111'* ]]; then
export XCODE_DIR=/Applications/Xcode111.app/Contents/Developer
export MACOS_VERSION=10.15
export IOS_VERSION=13.1
export TVOS_VERSION=13.0
export WATCHOS_VERSION=6.0
export WATCHOS64_32_VERSION=6.0
else
export XCODE_DIR=/Applications/Xcode101.app/Contents/Developer
export MACOS_VERSION=10.14
Expand Down Expand Up @@ -240,11 +233,8 @@ fi
if [[ ${CI_TAGS} == *'sdks-mac'* ]];
then
# configuration on our bots
if [[ ${CI_TAGS} == *'xcode112'* ]]; then
export XCODE_DIR=/Applications/Xcode112.app/Contents/Developer
export MACOS_VERSION=10.15
elif [[ ${CI_TAGS} == *'xcode111'* ]]; then
export XCODE_DIR=/Applications/Xcode111.app/Contents/Developer
if [[ ${CI_TAGS} == *'xcode113'* ]]; then
export XCODE_DIR=/Applications/Xcode113.app/Contents/Developer
export MACOS_VERSION=10.15
else
export XCODE_DIR=/Applications/Xcode101.app/Contents/Developer
Expand Down