<_runtimeOSVersionIndex>$(_runtimeOS.IndexOfAny(".-0123456789"))</_runtimeOSVersionIndex>
<_runtimeOSFamily Condition="'$(_runtimeOSVersionIndex)' != '-1'">$(_runtimeOS.SubString(0, $(_runtimeOSVersionIndex)))</_runtimeOSFamily>
- <_buildingInOSX>$([MSBuild]::IsOSPlatform('OSX'))</_buildingInOSX>
<_portableOS>linux</_portableOS>
<_portableOS Condition="'$(_runtimeOS)' == 'linux-musl'">linux-musl</_portableOS>
- <_portableOS Condition="$(_buildingInOSX)">osx</_portableOS>
+ <_portableOS Condition="$([MSBuild]::IsOSPlatform('OSX'))">osx</_portableOS>
<_portableOS Condition="'$(_runtimeOSFamily)' == 'win' or '$(TargetOS)' == 'windows'">win</_portableOS>
<_portableOS Condition="'$(_runtimeOSFamily)' == 'FreeBSD'">freebsd</_portableOS>
<_portableOS Condition="'$(_runtimeOSFamily)' == 'illumos'">illumos</_portableOS>
<_toolRuntimeRID Condition="'$(_runtimeOS)' == 'linux-musl' and $(TargetArchitecture.StartsWith('arm')) and !$(_hostArch.StartsWith('arm'))">linux-x64</_toolRuntimeRID>
<!-- There are no WebAssembly tools, so use the default ones -->
- <_toolRuntimeRID Condition="'$(_runtimeOS)' == 'browser' and '$(TargetOS)' == 'windows'">win-x64</_toolRuntimeRID>
- <_toolRuntimeRID Condition="'$(_runtimeOS)' == 'browser' and '$(TargetOS)' != 'windows' and $(_buildingInOSX)">osx-x64</_toolRuntimeRID>
- <_toolRuntimeRID Condition="'$(_runtimeOS)' == 'browser' and '$(TargetOS)' != 'windows' and !$(_buildingInOSX)">linux-x64</_toolRuntimeRID>
+ <_toolRuntimeRID Condition="'$(_runtimeOS)' == 'browser'">linux-x64</_toolRuntimeRID>
+ <_toolRuntimeRID Condition="'$(_runtimeOS)' == 'browser' and $([MSBuild]::IsOSPlatform('WINDOWS'))">win-x64</_toolRuntimeRID>
+ <_toolRuntimeRID Condition="'$(_runtimeOS)' == 'browser' and $([MSBuild]::IsOSPlatform('OSX'))">osx-x64</_toolRuntimeRID>
<!-- There are no Android tools, so use the default ones -->
- <_toolRuntimeRID Condition="'$(_runtimeOS)' == 'android' and '$(TargetOS)' == 'windows'">win-x64</_toolRuntimeRID>
- <_toolRuntimeRID Condition="'$(_runtimeOS)' == 'android' and '$(TargetOS)' != 'windows' and $(_buildingInOSX)">osx-x64</_toolRuntimeRID>
- <_toolRuntimeRID Condition="'$(_runtimeOS)' == 'android' and '$(TargetOS)' != 'windows' and !$(_buildingInOSX)">linux-x64</_toolRuntimeRID>
+ <_toolRuntimeRID Condition="'$(_runtimeOS)' == 'android'">linux-x64</_toolRuntimeRID>
+ <_toolRuntimeRID Condition="'$(_runtimeOS)' == 'android' and $([MSBuild]::IsOSPlatform('WINDOWS'))">win-x64</_toolRuntimeRID>
+ <_toolRuntimeRID Condition="'$(_runtimeOS)' == 'android' and $([MSBuild]::IsOSPlatform('OSX'))">osx-x64</_toolRuntimeRID>
<!-- There are no iOS or tvOS tools and it can be built on OSX only, so use that -->
<_toolRuntimeRID Condition="'$(_runtimeOS)' == 'ios' or '$(_runtimeOS)' == 'tvos'">osx-x64</_toolRuntimeRID>
+
<MicrosoftNetCoreIlasmPackageRuntimeId>$(_toolRuntimeRID)</MicrosoftNetCoreIlasmPackageRuntimeId>
<_packageRID Condition="'$(PortableBuild)' == 'true'">$(_portableOS)-$(TargetArchitecture)</_packageRID>
#include <errno.h>
#include <limits>
+#include "config.gc.h"
+
#include "cgroup.h"
#ifndef SIZE_T_MAX
#cmakedefine01 HAVE_SYSINFO_WITH_MEM_UNIT
#cmakedefine01 HAVE_XSW_USAGE
#cmakedefine01 HAVE_XSWDEV
-
+#cmakedefine01 HAVE_NON_LEGACY_STATFS
#endif // __CONFIG_H__
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)
}
else
{
- // Use platform default
- sig->callConv = _compilation.TypeSystemContext.Target.IsWindows
- ? CorInfoCallConv.CORINFO_CALLCONV_STDCALL
- : CorInfoCallConv.CORINFO_CALLCONV_C;
+ sig->callConv = (CorInfoCallConv)PlatformDefaultUnmanagedCallingConvention();
}
}
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);
// 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;
flags.UnmanagedCallingConvention = MethodSignatureFlags.UnmanagedCallingConventionThisCall;
break;
case CallingConvention.Winapi:
- flags.UnmanagedCallingConvention = MethodSignatureFlags.UnmanagedCallingConventionStdCall;
+ // Platform default
break;
}
}
{
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:
/// bytes will be lost. If the buffer is larger than 20 bytes, the
/// rest of the buffer is left unmodified.
/// </param>
+#if ES_BUILD_STANDALONE
public void Finish(byte[] output)
+#else
+ public void Finish(Span<byte> output)
+#endif
{
long l = _length + 8 * _pos;
Append(0x80);
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
)
<Compile Include="$(MSBuildThisFileDirectory)System\Threading\LazyThreadSafetyMode.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Threading\LockRecursionException.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Threading\LowLevelLock.cs" Condition="'$(FeatureSharedLowLevelLock)' == 'true'" />
+ <Compile Include="$(MSBuildThisFileDirectory)System\Threading\LowLevelSpinWaiter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Threading\LowLevelMonitor.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Threading\ManualResetEvent.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Threading\ManualResetEventSlim.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Threading\Thread.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Threading\ThreadAbortException.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Threading\ThreadExceptionEventArgs.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)System\Threading\ThreadInt64PersistentCounter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Threading\ThreadInterruptedException.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Threading\ThreadLocal.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Threading\ThreadPool.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Threading\PortableThreadPool.CpuUtilizationReader.Windows.cs" Condition="'$(TargetsWindows)' == 'true'" />
<Compile Include="$(MSBuildThisFileDirectory)System\Threading\LowLevelLifoSemaphore.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Threading\LowLevelLifoSemaphore.Windows.cs" Condition="'$(TargetsWindows)' == 'true'" />
- <Compile Include="$(MSBuildThisFileDirectory)System\Threading\LowLevelSpinWaiter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Threading\RegisteredWaitHandle.Portable.cs" />
- <Compile Include="$(MSBuildThisFileDirectory)System\Threading\ThreadInt64PersistentCounter.cs" />
</ItemGroup>
</Project>