-
Notifications
You must be signed in to change notification settings - Fork 167
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
Fix .NET Native compilation #2170
Conversation
[FieldOffset(0)] | ||
[MarshalAs(UnmanagedType.U1)] | ||
private bool bool_value; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing the [MarshalAs]
attribute from bool_value
appears to fix the issue.
@@ -11,15 +11,14 @@ | |||
<AssemblyName>Tests.UWP</AssemblyName> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewers can ignore changes to this file - since we don't run UWP tests automatically, the project file had rotted a little and needed to bring it up to date to be able to debug things.
@@ -46,6 +46,9 @@ if(APPLE) | |||
endif() | |||
elseif(CMAKE_SYSTEM_NAME MATCHES "^Windows") | |||
add_definitions(/DWIN32_LEAN_AND_MEAN) | |||
add_compile_options( | |||
/MP # Enable multi-processor compilation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fealebenpae added this since it seemed like we didn't compile the wrapper sources in parallel.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose this might be a legitimate bug in the MCG - after all in Win32 BOOL
is usually 4 bytes, so maybe the marshaler hasn't been exercised with the more portable 1-byte bool
? Whatever the reason, piggy-backing on int_value
is a good workaround.
Description
Hopefully fixes #2169.
TODO