mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-05-31 22:17:27 +00:00
![]() 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`. |
||
---|---|---|
.. | ||
blocking_op.c | ||
blocking_op.h | ||
LICENSE | ||
locking.h | ||
posix.c | ||
posix.h | ||
queue.h | ||
random.c | ||
random.h | ||
README.md | ||
refcount.h | ||
rights.h | ||
ssp_config.h | ||
str.c | ||
str.h |
This directory consists of selected files copied from the [src/libemulator] directory in the cloudabi-utils repository, with minor modifications, along with the accompanying LICENSE file from that repository.
The modifications are marked with WASMTIME_*
preprocessor macros.
The files were copied at git revision 223dadc53248552db43e012c67ed08cf416a2b12 which is dated Tue Jun 25 17:22:07 2019 -0700 .