cosmopolitan: Update compiler and update platform_internal.h (#3079)

This fixes the cosmopolitan platform.
- Switch `build_cosmocc.sh` and platform documentation to
  explicitly use the x86_64 cosmocc compiler as multi-arch
  cosmocc won't work here. Older version `cosmocc` just did
  a x86_64 build.
- Add missing items from `platform_internal.h` to fix build.
This commit is contained in:
Gavin Hayes
2024-01-24 03:04:48 -05:00
committed by GitHub
parent d815bbc3db
commit bf9fb2e680
3 changed files with 12 additions and 5 deletions

View File

@ -447,12 +447,12 @@ make
## Cosmopolitan Libc
Currently, only x86_64 architecture with interpreter modes is supported.
Clone the Cosmopolitan Libc. Setup `cosmocc` as described in [Getting Started](https://github.com/jart/cosmopolitan/#getting-started) being sure to get it into `PATH`.
Setup `cosmocc` as described in [Getting Started](https://github.com/jart/cosmopolitan/#getting-started) being sure to get its `bin` directory into `PATH`.
Build iwasm
``` Bash
export CC=cosmocc
export CXX=cosmoc++
export CC=x86_64-unknown-cosmo-cc
export CXX=x86_64-unknown-cosmo-c++
rm -rf build
mkdir build
cmake -DWAMR_BUILD_INTERP=1 -DWAMR_BUILD_FAST_INTERP=1 -B build

View File

@ -2,8 +2,8 @@
# Copyright (C) 2023 Dylibso. All rights reserved.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
export CC=cosmocc
export CXX=cosmoc++
export CC=x86_64-unknown-cosmo-cc
export CXX=x86_64-unknown-cosmo-c++
rm -rf build
mkdir build
cmake -DWAMR_BUILD_INTERP=1 -DWAMR_BUILD_FAST_INTERP=1 -B build