-
Notifications
You must be signed in to change notification settings - Fork 189
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
set(CMAKE_SYSTEM_NAME WASI)
issues on macOS host
#181
Comments
I think that this can be made to work without installing into the system location. We already include both |
(I'm not sure what the exact answer is.. but the existence of |
Hmm, for some reason on our end the platform file was not picked up. Do you have a hint how to set an alternative platform path? |
Looks like its Looking at the emscripten cmake plugin it looks like the toolchain file injects: I wonder if that is pattern we can/should copy? |
That is a good lead! A quick search in CMake docs shows unfortunately no results for Don't see anything related to platform in the variable list. Have not tried whether abusing module could help (I doubt it). I have to come back to this tomorrow. |
I think it will look for |
Can you see if this fixes it: #182 |
does this problem still exist? i have something using i got a few of the following warnings, both on macOS and ubuntu.
despite the above warnings, it seems to build a reasonable wasm binary. Note: my project's Note: while setting |
Also add some basic testing for the cmake toolchain file. Fixes: #181
It is great to have
wasi.cmake
and we use it in several projects (ethash,evmone), however during integration we have noticed one shortcoming stemming from theset(CMAKE_SYSTEM_NAME WASI)
setting.CMake will try to find
Platform/WASI.cmake
, but if missing, it will fall back to the host system. This works okay on Linux systems, but fails on macOS as that will add compiler settings only available/valid for macOS targets.There are two possible fixes I have found:
CMAKE_SYSTEM_NAME
toLinux
The downside of option 1 is that it requires change to the installed cmake (copying a new file), while using the toolchain file works without any host changes.
We have decided to override the system name in our files, but I wonder if it would make sense to just change it to Linux in this repository. Any opinions? I can submit a PR if that is there's agreement for this change.
If there's any other options on top of the above, please let me know.
The text was updated successfully, but these errors were encountered: