8000 gh-95174: Add pthread stubs for WASI (GH-95234) by tiran · Pull Request #95234 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-95174: Add pthread stubs for WASI (GH-95234) #95234

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

Merged
merged 6 commits into from
Jul 27, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Drop last occurence of WASIX
  • Loading branch information
tiran committed Jul 27, 2022
commit 94f4035f6d50f8f0fc39208f57c8144cee8e5c1c
2 changes: 1 addition & 1 deletion Include/cpython/pthread_stubs.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# define _POSIX_THREADS 1
#endif

/* Minimal pthread stubs for CPython
/* Minimal pthread stubs for CPython.
*
* The stubs implement the minimum pthread API for CPython.
* - pthread_create() fails.
Expand Down
3 changes: 1 addition & 2 deletions Tools/wasm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,7 @@ WASI builds require [WASI SDK](https://github.com/WebAssembly/wasi-sdk) 16.0+.

The script ``wasi-env`` sets necessary compiler and linker flags as well as
``pkg-config`` overrides. The script assumes that WASI-SDK is installed in
``/opt/wasi-sdk`` or ``$WASI_SDK_PATH`` and WASIX is installed in
``/opt/wasix`` or ``$WASIX_PATH``.
``/opt/wasi-sdk`` or ``$WASI_SDK_PATH``.

```shell
mkdir -p builddir/wasi
Expand Down
7 changes: 0 additions & 7 deletions Tools/wasm/wasi-env
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ fi

WASI_SDK_PATH="${WASI_SDK_PATH:-/opt/wasi-sdk}"
WASI_SYSROOT="${WASI_SDK_PATH}/share/wasi-sysroot"
WASIX_PATH="${WASIX_PATH:-/opt/wasix}"

if ! test -x "${WASI_SDK_PATH}/bin/clang"; then
echo "Error: ${WASI_SDK_PATH}/bin/clang does not exist." >&2
Expand Down Expand Up @@ -65,12 +64,6 @@ PKG_CONFIG_PATH=""
PKG_CONFIG_LIBDIR="${WASI_SYSROOT}/lib/pkgconfig:${WASI_SYSROOT}/share/pkgconfig"
PKG_CONFIG_SYSROOT_DIR="${WASI_SYSROOT}"

# add WASIX (POSIX stubs for WASI) if WASIX is installed
if test -f "${WASIX_PATH}/lib/libwasix.a"; then
CFLAGS="${CFLAGS} -isystem ${WASIX_PATH}/include"
LDFLAGS="${LDFLAGS} -L${WASIX_PATH}/lib -lwasix"
fi

PATH="${WASI_SDK_PATH}/bin:${PATH}"

export WASI_SDK_PATH WASI_SYSROOT
Expand Down
0