mirror of
https://github.com/python/cpython.git
synced 2025-07-18 16:55:20 +00:00
[3.11] gh-95853: Add script to automate WASM build (GH-95828, GH-95985, GH-96045, GH-96389, GH-96744) (GH-96749)
Automate WASM build with a new Python script. The script provides several build profiles with configure flags for Emscripten flavors and WASI. The script can detect and use Emscripten SDK and WASI SDK from default locations or env vars. ``configure`` now detects Node arguments and creates HOSTRUNNER arguments for Node 16. It also sets correct arguments for ``wasm64-emscripten``.
This commit is contained in:
parent
390123b412
commit
4958820032
16 changed files with 1237 additions and 41 deletions
|
@ -2775,14 +2775,18 @@ EM_JS(char *, _Py_emscripten_runtime, (void), {
|
|||
if (typeof navigator == 'object') {
|
||||
info = navigator.userAgent;
|
||||
} else if (typeof process == 'object') {
|
||||
info = "Node.js ".concat(process.version)
|
||||
info = "Node.js ".concat(process.version);
|
||||
} else {
|
||||
info = "UNKNOWN"
|
||||
info = "UNKNOWN";
|
||||
}
|
||||
var len = lengthBytesUTF8(info) + 1;
|
||||
var res = _malloc(len);
|
||||
stringToUTF8(info, res, len);
|
||||
if (res) stringToUTF8(info, res, len);
|
||||
#if __wasm64__
|
||||
return BigInt(res);
|
||||
#else
|
||||
return res;
|
||||
#endif
|
||||
});
|
||||
|
||||
static PyObject *
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue