mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2024-11-26 23:42:05 +00:00
d8ee771e28
This PR adds the Cosmopolitan Libc platform enabling compatibility with multiple x86_64 operating systems with the same binary. The platform is similar to the Linux platform, but for now only x86_64 with interpreter modes are supported. The only major change to the core is `posix.c/convert_errno()` was rewritten to use a switch statement. With Cosmopolitan errno values depend on the currently running operating system, and so they are non-constant and cannot be used in array designators. However, the `cosmocc` compiler allows non-constant case labels in switch statements, enabling the new version. And updated wamr-test-suites script to add `-j <platform>` option. The spec tests can be ran via `CC=cosmocc ./test_wamr.sh -j cosmopolitan -t classic-interp` or `CC=cosmocc ./test_wamr.sh -j cosmopolitan -t fast-interp`. |
||
---|---|---|
.. | ||
alios | ||
android | ||
common | ||
cosmopolitan | ||
darwin | ||
ego | ||
esp-idf | ||
freebsd | ||
include | ||
linux | ||
linux-sgx | ||
nuttx | ||
riot | ||
rt-thread | ||
vxworks | ||
windows | ||
zephyr | ||
README.md |
This folder contains the platform abstract layer for multiple platforms. To support a new platform, you can simply create a new folder here and implement all the APIs defined in include
folder.
Refer to port_wamr.md for how to port WAMR to a target platform.