diff --git a/eng/Configurations.props b/eng/Configurations.props
index 09814ae0c05e35..7034d1d9de6e35 100644
--- a/eng/Configurations.props
+++ b/eng/Configurations.props
@@ -87,10 +87,9 @@
<_runtimeOSVersionIndex>$(_runtimeOS.IndexOfAny(".-0123456789"))
<_runtimeOSFamily Condition="'$(_runtimeOSVersionIndex)' != '-1'">$(_runtimeOS.SubString(0, $(_runtimeOSVersionIndex)))
- <_buildingInOSX>$([MSBuild]::IsOSPlatform('OSX'))
<_portableOS>linux
<_portableOS Condition="'$(_runtimeOS)' == 'linux-musl'">linux-musl
- <_portableOS Condition="$(_buildingInOSX)">osx
+ <_portableOS Condition="$([MSBuild]::IsOSPlatform('OSX'))">osx
<_portableOS Condition="'$(_runtimeOSFamily)' == 'win' or '$(TargetOS)' == 'windows'">win
<_portableOS Condition="'$(_runtimeOSFamily)' == 'FreeBSD'">freebsd
<_portableOS Condition="'$(_runtimeOSFamily)' == 'illumos'">illumos
@@ -123,17 +122,18 @@
<_toolRuntimeRID Condition="'$(_runtimeOS)' == 'linux-musl' and $(TargetArchitecture.StartsWith('arm')) and !$(_hostArch.StartsWith('arm'))">linux-x64
- <_toolRuntimeRID Condition="'$(_runtimeOS)' == 'browser' and '$(TargetOS)' == 'windows'">win-x64
- <_toolRuntimeRID Condition="'$(_runtimeOS)' == 'browser' and '$(TargetOS)' != 'windows' and $(_buildingInOSX)">osx-x64
- <_toolRuntimeRID Condition="'$(_runtimeOS)' == 'browser' and '$(TargetOS)' != 'windows' and !$(_buildingInOSX)">linux-x64
+ <_toolRuntimeRID Condition="'$(_runtimeOS)' == 'browser'">linux-x64
+ <_toolRuntimeRID Condition="'$(_runtimeOS)' == 'browser' and $([MSBuild]::IsOSPlatform('WINDOWS'))">win-x64
+ <_toolRuntimeRID Condition="'$(_runtimeOS)' == 'browser' and $([MSBuild]::IsOSPlatform('OSX'))">osx-x64
- <_toolRuntimeRID Condition="'$(_runtimeOS)' == 'android' and '$(TargetOS)' == 'windows'">win-x64
- <_toolRuntimeRID Condition="'$(_runtimeOS)' == 'android' and '$(TargetOS)' != 'windows' and $(_buildingInOSX)">osx-x64
- <_toolRuntimeRID Condition="'$(_runtimeOS)' == 'android' and '$(TargetOS)' != 'windows' and !$(_buildingInOSX)">linux-x64
+ <_toolRuntimeRID Condition="'$(_runtimeOS)' == 'android'">linux-x64
+ <_toolRuntimeRID Condition="'$(_runtimeOS)' == 'android' and $([MSBuild]::IsOSPlatform('WINDOWS'))">win-x64
+ <_toolRuntimeRID Condition="'$(_runtimeOS)' == 'android' and $([MSBuild]::IsOSPlatform('OSX'))">osx-x64
<_toolRuntimeRID Condition="'$(_runtimeOS)' == 'ios' or '$(_runtimeOS)' == 'tvos'">osx-x64
+
$(_toolRuntimeRID)
<_packageRID Condition="'$(PortableBuild)' == 'true'">$(_portableOS)-$(TargetArchitecture)
diff --git a/src/coreclr/src/gc/unix/cgroup.cpp b/src/coreclr/src/gc/unix/cgroup.cpp
index d61026f1c828f5..51b308d3c282e3 100644
--- a/src/coreclr/src/gc/unix/cgroup.cpp
+++ b/src/coreclr/src/gc/unix/cgroup.cpp
@@ -31,6 +31,8 @@ Module Name:
#include
#include
+#include "config.gc.h"
+
#include "cgroup.h"
#ifndef SIZE_T_MAX
diff --git a/src/coreclr/src/gc/unix/config.gc.h.in b/src/coreclr/src/gc/unix/config.gc.h.in
index e633193218a2d3..dbcf506f91d23e 100644
--- a/src/coreclr/src/gc/unix/config.gc.h.in
+++ b/src/coreclr/src/gc/unix/config.gc.h.in
@@ -30,6 +30,6 @@
#cmakedefine01 HAVE_SYSINFO_WITH_MEM_UNIT
#cmakedefine01 HAVE_XSW_USAGE
#cmakedefine01 HAVE_XSWDEV
-
+#cmakedefine01 HAVE_NON_LEGACY_STATFS
#endif // __CONFIG_H__
diff --git a/src/coreclr/src/gc/unix/configure.cmake b/src/coreclr/src/gc/unix/configure.cmake
index 99f848c997b7be..02c4725e538ba5 100644
--- a/src/coreclr/src/gc/unix/configure.cmake
+++ b/src/coreclr/src/gc/unix/configure.cmake
@@ -119,4 +119,30 @@ int main(int argc, char **argv)
return 0;
}" HAVE_XSW_USAGE)
+check_struct_has_member(
+ "struct statfs"
+ f_fstypename
+ "sys/mount.h"
+ HAVE_STATFS_FSTYPENAME)
+
+check_struct_has_member(
+ "struct statvfs"
+ f_fstypename
+ "sys/mount.h"
+ HAVE_STATVFS_FSTYPENAME)
+
+# statfs: Find whether this struct exists
+if (HAVE_STATFS_FSTYPENAME OR HAVE_STATVFS_FSTYPENAME)
+ set (STATFS_INCLUDES sys/mount.h)
+else ()
+ set (STATFS_INCLUDES sys/statfs.h)
+endif ()
+
+check_prototype_definition(
+ statfs
+ "int statfs(const char *path, struct statfs *buf)"
+ 0
+ ${STATFS_INCLUDES}
+ HAVE_NON_LEGACY_STATFS)
+
configure_file(${CMAKE_CURRENT_LIST_DIR}/config.gc.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.gc.h)
diff --git a/src/coreclr/src/tools/Common/JitInterface/CorInfoImpl.cs b/src/coreclr/src/tools/Common/JitInterface/CorInfoImpl.cs
index 122987d7659d41..99ced50ec73d3c 100644
--- a/src/coreclr/src/tools/Common/JitInterface/CorInfoImpl.cs
+++ b/src/coreclr/src/tools/Common/JitInterface/CorInfoImpl.cs
@@ -588,10 +588,7 @@ private void Get_CORINFO_SIG_INFO(MethodSignature signature, CORINFO_SIG_INFO* s
}
else
{
- // Use platform default
- sig->callConv = _compilation.TypeSystemContext.Target.IsWindows
- ? CorInfoCallConv.CORINFO_CALLCONV_STDCALL
- : CorInfoCallConv.CORINFO_CALLCONV_C;
+ sig->callConv = (CorInfoCallConv)PlatformDefaultUnmanagedCallingConvention();
}
}
@@ -1043,10 +1040,19 @@ private bool isIntrinsicType(CORINFO_CLASS_STRUCT_* classHnd)
return type.IsIntrinsic;
}
+ private MethodSignatureFlags PlatformDefaultUnmanagedCallingConvention()
+ {
+ return _compilation.TypeSystemContext.Target.IsWindows ?
+ MethodSignatureFlags.UnmanagedCallingConventionStdCall : MethodSignatureFlags.UnmanagedCallingConventionCdecl;
+ }
+
private CorInfoUnmanagedCallConv getUnmanagedCallConv(CORINFO_METHOD_STRUCT_* method)
{
MethodSignatureFlags unmanagedCallConv = HandleToObject(method).GetPInvokeMethodMetadata().Flags.UnmanagedCallingConvention;
+ if (unmanagedCallConv == MethodSignatureFlags.None)
+ unmanagedCallConv = PlatformDefaultUnmanagedCallingConvention();
+
// Verify that it is safe to convert MethodSignatureFlags.UnmanagedCallingConvention to CorInfoUnmanagedCallConv via a simple cast
Debug.Assert((int)CorInfoUnmanagedCallConv.CORINFO_UNMANAGED_CALLCONV_C == (int)MethodSignatureFlags.UnmanagedCallingConventionCdecl);
Debug.Assert((int)CorInfoUnmanagedCallConv.CORINFO_UNMANAGED_CALLCONV_STDCALL == (int)MethodSignatureFlags.UnmanagedCallingConventionStdCall);
diff --git a/src/coreclr/src/tools/Common/TypeSystem/Common/MetadataVirtualMethodAlgorithm.cs b/src/coreclr/src/tools/Common/TypeSystem/Common/MetadataVirtualMethodAlgorithm.cs
index cfd0a643ad0ee9..a14d558df03612 100644
--- a/src/coreclr/src/tools/Common/TypeSystem/Common/MetadataVirtualMethodAlgorithm.cs
+++ b/src/coreclr/src/tools/Common/TypeSystem/Common/MetadataVirtualMethodAlgorithm.cs
@@ -586,9 +586,6 @@ public override MethodDesc ResolveVariantInterfaceMethodToVirtualMethodOnType(Me
// See current interface call resolution for details on how that happens.
private static MethodDesc ResolveInterfaceMethodToVirtualMethodOnType(MethodDesc interfaceMethod, MetadataType currentType)
{
- if (currentType.IsInterface)
- return null;
-
MethodDesc methodImpl = FindImplFromDeclFromMethodImpls(currentType, interfaceMethod);
if (methodImpl != null)
return methodImpl;
diff --git a/src/coreclr/src/tools/Common/TypeSystem/Ecma/MetadataExtensions.cs b/src/coreclr/src/tools/Common/TypeSystem/Ecma/MetadataExtensions.cs
index 157d774dd569ad..4cbc5f3b2a19d6 100644
--- a/src/coreclr/src/tools/Common/TypeSystem/Ecma/MetadataExtensions.cs
+++ b/src/coreclr/src/tools/Common/TypeSystem/Ecma/MetadataExtensions.cs
@@ -232,7 +232,7 @@ public static PInvokeFlags GetDelegatePInvokeFlags(this EcmaType type)
flags.UnmanagedCallingConvention = MethodSignatureFlags.UnmanagedCallingConventionThisCall;
break;
case CallingConvention.Winapi:
- flags.UnmanagedCallingConvention = MethodSignatureFlags.UnmanagedCallingConventionStdCall;
+ // Platform default
break;
}
}
diff --git a/src/coreclr/src/tools/Common/TypeSystem/Interop/MethodDesc.Interop.cs b/src/coreclr/src/tools/Common/TypeSystem/Interop/MethodDesc.Interop.cs
index 4db5df45d5cd73..dc5a996330680f 100644
--- a/src/coreclr/src/tools/Common/TypeSystem/Interop/MethodDesc.Interop.cs
+++ b/src/coreclr/src/tools/Common/TypeSystem/Interop/MethodDesc.Interop.cs
@@ -158,14 +158,13 @@ public MethodSignatureFlags UnmanagedCallingConvention
{
switch (_attributes & PInvokeAttributes.CallingConventionMask)
{
- case PInvokeAttributes.CallingConventionWinApi:
- return MethodSignatureFlags.UnmanagedCallingConventionStdCall; // TODO: CDecl for varargs
case PInvokeAttributes.CallingConventionCDecl:
return MethodSignatureFlags.UnmanagedCallingConventionCdecl;
case PInvokeAttributes.CallingConventionStdCall:
return MethodSignatureFlags.UnmanagedCallingConventionStdCall;
case PInvokeAttributes.CallingConventionThisCall:
return MethodSignatureFlags.UnmanagedCallingConventionThisCall;
+ case PInvokeAttributes.CallingConventionWinApi: // Platform default
case PInvokeAttributes.None:
return MethodSignatureFlags.None;
default:
diff --git a/src/libraries/Common/src/System/Sha1ForNonSecretPurposes.cs b/src/libraries/Common/src/System/Sha1ForNonSecretPurposes.cs
index 4ea03f2d995ae5..bf87f32624be31 100644
--- a/src/libraries/Common/src/System/Sha1ForNonSecretPurposes.cs
+++ b/src/libraries/Common/src/System/Sha1ForNonSecretPurposes.cs
@@ -79,7 +79,11 @@ public void Append(ReadOnlySpan input)
/// bytes will be lost. If the buffer is larger than 20 bytes, the
/// rest of the buffer is left unmodified.
///
+#if ES_BUILD_STANDALONE
public void Finish(byte[] output)
+#else
+ public void Finish(Span output)
+#endif
{
long l = _length + 8 * _pos;
Append(0x80);
diff --git a/src/libraries/Native/build-native.cmd b/src/libraries/Native/build-native.cmd
index c0005c40bbba55..8568899162a340 100644
--- a/src/libraries/Native/build-native.cmd
+++ b/src/libraries/Native/build-native.cmd
@@ -158,7 +158,7 @@ set __generatorArgs=
if [%__Ninja%] == [1] (
set __generatorArgs=
) else if [%__BuildArch%] == [wasm] (
- set __generatorArgs=-j
+ set __generatorArgs=
) else (
set __generatorArgs=/p:Platform=%__BuildArch% /p:PlatformToolset="%__PlatformToolset%" -noWarn:MSB8065
)
diff --git a/src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems b/src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems
index 3266f4f912d536..5e67e042260718 100644
--- a/src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems
+++ b/src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems
@@ -954,6 +954,7 @@
+
@@ -995,6 +996,7 @@
+
@@ -1955,8 +1957,6 @@
-
-