-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Add a test to validate hostfxr C API #110169
Conversation
Tagging subscribers to this area: @vitek-karas, @agocke, @VSadov |
7aa4875
to
37fe3b5
Compare
e.g. without the struct keyword, it failed to build tests
|
@@ -322,6 +323,10 @@ struct hostfxr_dotnet_environment_info | |||
const struct hostfxr_dotnet_environment_framework_info* frameworks; | |||
}; | |||
|
|||
typedef void(HOSTFXR_CALLTYPE* hostfxr_get_dotnet_environment_info_result_fn)( | |||
const struct hostfxr_dotnet_environment_info* info, | |||
void* result_context); |
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.
Had to move it after the struct hostfxr_dotnet_environment_framework_info
is defined, to fix:
In file included from /Users/am11/projects/runtime5/src/native/corehost/test/mockhostfxr/test_c_api.c:8:
/Users/am11/projects/runtime5/src/native/corehost/hostfxr.h:91:18: error: declaration of 'struct hostfxr_dotnet_environment_info' will not be visible outside of this function [-Werror,-Wvisibility]
91 | const struct hostfxr_dotnet_environment_info* info,
| ^
1 error generated.
make[2]: *** [test/mockhostfxr/CMakeFiles/mockhostfxr_2_2.dir/test_c_api.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
Backport together with #110060, since it fixes another ordering issue related to C vs. C++. |
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.
Thank you!
Add a test for #109763 and align the style as headers in
src/native/minipal/*.h
.