-
Notifications
You must be signed in to change notification settings - Fork 208
Description
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 the set(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:
- Copy the platform file to CMake
- Change/override the
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.