-
Notifications
You must be signed in to change notification settings - Fork 645
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 reference type support by default for darwin to support WASI-SDK-25 #3978
Add reference type support by default for darwin to support WASI-SDK-25 #3978
Conversation
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.
LGTM
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.
do you know any reasons this should be per-platform?
otherwise i guess it's better to put this in config_common.cmake
as we do for WAMR_BUILD_BULK_MEMORY.
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.
LGTM
Ref-types feature is a relatively complex/big feature and will increase lots of footprint if it is enabled, and it seems that it is seldom used by some platforms, I guess it is better to let the platform's CMakeListx.txt decide how to set it. There were similar changes in PR #3894. If we decide to enable it by default in |
I think it would make sense to enable for the desktop development platforms. For new users coming to WAMR seeing the output of RUST or the WASI-SDK run is important for evaluating the platform. For experienced users optimizing for size is key. For the RTOS based platforms I'd guess that these should be built without Ref-types. Mentioning the options selected during the build process - and the options not selected would be really great improvement. Additionally we should (I haven't yet) make sure that we can turn off ref-types in the WASI-SDK to support those platforms that don't want this feature. |
AFAIK some of the options are printed when generating CMake file, but some of them are not. Also, it'd be good to print the enabled features when user calls |
I am creating a new document about which wasm proposals are on-by-default and which are off-by-default. Are you suggesting we should output something like that during cmake configuration and execution by Might need to add the library case |
In that case, it should include linux, macos and windows, right? |
I am going to merge this PR first and please continue our discussion here. |
Yes, something along those lines.
@woodsmc At least in Rust it's not possible when using "stable" compiler (and I guess it might not be possible for WASI-SDK either, but I'm not 100% sure). Our current approach is to use |
This resolved the issue WASI-SDK 25
call_indrect
doesn't work on Darwin, by turning on reference types by default for iwasm on Darwin.The error message is triggered by the way call indirect is rendered by WASI-SDK25, which has changed from WASI-SDK24. Turning on the reference checks allows iwasm on Darwin use the WASI-SDK generated code directly.
Updated with additional information