Skip to content
This repository has been archived by the owner on Jan 11, 2022. It is now read-only.

Avoid using -pthread #2

Open
bramvdbogaerde opened this issue Aug 18, 2021 · 0 comments
Open

Avoid using -pthread #2

bramvdbogaerde opened this issue Aug 18, 2021 · 0 comments

Comments

@bramvdbogaerde
Copy link
Owner

We are currently compiling Z3 to WebAssembly using the -pthread option, the reason for this is because Z3 seems to be using some Z3 functionality.

Emscripten supports pthreads, but needs a SharedArrayBuffer which is only available on pages that have specific COP headers set [1].

This somewhat limits the hosting possibilities (although they can be mitigated using service workers [2]).

Using the Z3 supported --single-threaded option does not seem to resolve the issue.

The proposal of this issue is to investigate the origins of the pthread dependency, and remove it from Z3 (either by doing some automated patch work, or by contributing a fix to the official Z3 repository).

[1] https://emscripten.org/docs/porting/pthreads.html
[2] https://github.com/gzuidhof/coi-serviceworker

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant