You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a case where including CallConvs in an UnmanagedCallersOnly attribute causes the AOT compiler to fail.
This works:
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
public static class foo
{
[UnmanagedCallersOnly]
public static void fun(IntPtr p, int t)
{
}
}
but this one fails:
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
public static class foo
{
[UnmanagedCallersOnly(CallConvs = new[] { typeof(CallConvCdecl) })]
public static void fun(IntPtr p, int t)
{
}
}
with this error:
eric@Erics-MacBook-Pro test % dotnet build
MSBuild version 17.3.0+92e077650 for .NET
Determining projects to restore...
Restored /Users/eric/Downloads/test/test.csproj (in 125 ms).
Detected signing identity: (omitted)
test -> /Users/eric/Downloads/test/bin/Debug/net6.0-ios/ios-arm64/test.dll
Optimizing assemblies for size, which may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink
Tool /usr/local/share/dotnet/packs/Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.ios-arm64/6.0.8/Sdk/../tools/mono-aot-cross execution finished (exit code = 134).
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/15.4.447/targets/Xamarin.Shared.Sdk.targets(1000,3): error : Failed to AOT compile test.dll, the AOT compiler exited with code 134 [/Users/eric/Downloads/test/test.csproj]
Build FAILED.
Description
We have a case where including
CallConvs
in anUnmanagedCallersOnly
attribute causes the AOT compiler to fail.This works:
but this one fails:
with this error:
Reproduction Steps
issue516_repro.zip
Expected behavior
The build should succeed
Actual behavior
The AOT compiler fails with error code 134.
Regression?
No response
Known Workarounds
No response
Configuration
Other information
Originally found:
ericsink/SQLitePCL.raw#516
The text was updated successfully, but these errors were encountered: