Commit Graph

144 Commits

Author SHA1 Message Date
Hood Chatham 4c9b38b85f
Emscripten 3.1.74 (#5403) 2025-02-02 17:28:11 +01:00
Hood Chatham 41b47b57f9
Emscripten 3.1.73 (#5401) 2025-02-01 20:14:52 +01:00
Hood Chatham 3520c92482
Emscripten 3.1.72 (#5399) 2025-02-01 13:02:06 +01:00
Hood Chatham 549a6edc69
Emscripten 3.1.71 (#5337) 2025-02-01 08:16:05 +01:00
Hood Chatham eebce17dee
Emscripten 3.1.70 (#5397) 2025-01-31 21:02:10 +01:00
Hood Chatham 7d42758ecb
Add sdl2_image-wasm-sjlj patch (#5395)
This is from #5320 but it can be merged ahead of that and I want to reduce
conflicts with the emscripten version updates
2025-01-31 14:35:41 +01:00
Hood Chatham 05d4096c3b
Emscripten 3.1.69 (#5391) 2025-01-31 14:34:53 +01:00
Hood Chatham 6c3d59b042
Emscripten 3.1.68 (#5390) 2025-01-30 18:50:19 +01:00
Hood Chatham 6a7c92303c
Emscripten 3.1.67 (#5333) 2025-01-30 14:47:15 +01:00
Hood Chatham 6a1a74aa31
Remove exitStatus patch (#5389) 2025-01-30 14:44:12 +01:00
Hood Chatham b28e9bcbc1
Emscripten 3.1.66 (#5382) 2025-01-30 11:03:58 +01:00
Hood Chatham 755f8281ed
Emscripten 3.1.65 (#5379) 2025-01-29 12:06:53 +01:00
Hood Chatham ed8ad327ec
Emscripten 3.1.64 (#5360) 2025-01-28 14:08:51 +01:00
Hood Chatham 9bee7c7fc3
Emscripten 3.1.63 (#5363) 2025-01-22 13:26:30 +01:00
Hood Chatham 58b389ec7c
Emscripten 3.1.62 (#5334) 2025-01-21 12:34:56 +01:00
Hood Chatham 4f61642fd7
Emscripten 3.1.61 (#5357) 2025-01-20 15:44:04 +01:00
Hood Chatham 28ff64fc9a
Emscripten 3.1.60 (#5350) 2025-01-19 22:11:28 +01:00
Hood Chatham c506083f3c
Emscripten 3.1.59 (#5343)
No difficulties here.
2025-01-17 09:25:39 +01:00
Hood Chatham 9b2b8b752d
Remove a large number of xfails from python_tests.yaml (#5217)
Co-authored-by: Gyeongjae Choi <def6488@gmail.com>
2024-12-20 14:16:17 +09:00
Gyeongjae Choi a64e534d03
Load shared libraries locally (#4876)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-07-30 20:05:25 +09:00
Hood Chatham c319cc7770
Fix dynamic library loading in cli runner (#4871)
All dependent libs should be loaded as globals. We should try  to use this to
simplify some of the logic in dynload.ts. Most likely what needs to happen is we
need to inspect the wheel at build time to determine which libraries are
"leaves" that are not dependencies of anything else and add this list to the
package metadata.

This should be removed eventually, because it is a bug somewhere else in the
dynamic loader that dependents need to be global.
2024-06-18 17:10:22 -07:00
Gyeongjae Choi 36565c7e9d
Revert "Update Emscripten to 3.1.60" (#4796) 2024-05-25 08:06:50 -04:00
Hood Chatham b16552a660
Update Emscripten to 3.1.60 (#4782) 2024-05-25 10:06:52 +09:00
Hood Chatham 9d2451d1fb
Emscripten 3.1.58 (#4715) 2024-05-07 09:59:57 +02:00
Joe Marshall ed9428e268
fix for exceptions in dynamic linked int64 code (#4698)
This is a backport of https://github.com/emscripten-core/emscripten/pull/21759 

It fixes a crash which happens when 
1) An exception is thrown inside a function returning int64
2) The function is in a dynamic library and has been called through dynamic invocation.
2024-04-17 17:36:26 +02:00
Hood Chatham 008a960945
Fix dup in nodefs (#4554)
Backport of emscripten-core/emscripten#21399. Resolves #4541.
2024-02-24 11:34:55 -08:00
Gyeongjae Choi a14d34fb1b
Emscripten 3.1.52 (#4399)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-01-23 21:18:42 +09:00
Hood Chatham 08585d91e5
Fix nodylink build (#4385) 2024-01-18 10:57:26 -08:00
Hood Chatham 4bafdafcca Update JSPI patch for Emscripten 3.1.45 2023-10-21 09:20:09 -07:00
Hood Chatham 3085cb9d5e Use Wasm Exceptions for invoke stubs if they exist (#3957)
If wasm exception handling is available, use dynamically generated modules
with wasm exception handling for the invoke stubs instead of a JS trampoline.
This is useful because JS trampolines interact poorly with JS Promise Integration.

In the future, we should switch exception handling ABIs to the compiler-provided
wasm exception handling ABI and we can remove this code. Currently we are
blocked on using compiler-provided wasm eh by Rust support.
2023-10-21 09:20:09 -07:00
Hood Chatham af7544cbbb
Add a no dynamic linking build option (#4203) 2023-10-14 12:13:27 -07:00
Hood Chatham b460383505
Use hoodmane/hiwire library instead of our own implementation (#4128)
This change switches to my external implementation of hiwire. This is the
minimal change set to do this, it uses some hacks to avoid changing any files
outside of `hiwire.{c,h,js}`. In followups, I will gradually switch to using
the new APIs rather than compatibility shims.
2023-09-23 18:21:19 -07:00
Hood Chatham 4774749070
FIX patch a bug in Emscripten that broke matplotlib (#4163) 2023-09-22 19:36:20 +09:00
Hood Chatham f28d8c9efc Revert JSPI Changes
This reverts commits:
9ed5e839ff
8861b317a6
b2c47ae766
ab8dc2eac6
3bcc527c92
2505d4d6a3
2023-09-14 07:26:46 -07:00
Hood Chatham 2505d4d6a3 Update JSPI patch for Emscripten 3.1.45 2023-09-13 16:38:29 -07:00
Hood Chatham 9ed5e839ff Use Wasm Exceptions for invoke stubs if they exist (#3957)
If wasm exception handling is available, use dynamically generated modules
with wasm exception handling for the invoke stubs instead of a JS trampoline.
This is useful because JS trampolines interact poorly with JS Promise Integration.

In the future, we should switch exception handling ABIs to the compiler-provided
wasm exception handling ABI and we can remove this code. Currently we are
blocked on using compiler-provided wasm eh by Rust support.
2023-09-13 16:22:07 -07:00
Hood Chatham df527fdad5
Emscripten 3.1.45 (#4094) 2023-08-29 13:37:31 +02:00
Hood Chatham 4d99d07366
Emscripten 3.1.44 (#4073) 2023-08-26 22:46:42 +02:00
Hood Chatham e19621d483
ENH Rework streams handling (#4035)
This fixes a number problems with the old stream handling:

1. Not possible to set a custom errno (necessary for proper interrupt
   handling and possibly for other things)

2. Inefficient: in a lot of cases we have data in one buffer and we need
   it placed into a different buffer, but we have to implement a function
   that gets one byte out of the source buffer and then call it repeatedly
   to move one byte at a time to the target buffer.

3. Ease of implementation: in many cases we already have perfectly good
   buffer manipulation APIs, so if we have direct access to the true source
   or target buffer we can just use these. See: the node IO code, which got
   much simpler.

This is backwards compatible, so you can still use the old input mechanism
or use buffered or raw output. But it adds a new method of directly implementing
read/write. For simplicity, we insure that the source/destination buffers are
always `Uint8Array` views that point to exactly the region that is meant to be
read/written.

The old mechanisms are faster than before and can correctly support keyboard
interrupts. Other than that I think the original behavior is unchanged. I added a
lot more test coverage to ensure backwards compatibility since there was pretty
anemic coverage before.

I think the read/write APIs are mostly pretty simple to use, with the exception
that someone might forget to return the number of bytes read. JavaScript's ordinary
behavior coerces the `undefined` to a 0, which leads to an infinite loop where the
filesystem repeatedly asks to read/write the same data since it sees no progress.
I added a check that writes an error message to the console and sets EIO when undefined
is returned so the infinite loop is prevented and the problem is explained.
2023-08-21 08:41:44 +02:00
Hood Chatham f8f026a5de
Emscripten 3.1.40 (#3888) 2023-08-08 21:16:43 +02:00
Hood Chatham 27071e63bf
Emscripten 3.1.39 (#3890) 2023-06-04 10:38:41 -07:00
Hood Chatham 01e1fd6e38
MAINT Add useful error when symbol resolution fails (#3894)
See upstream PR:
emscripten-core/emscripten#19402

This only affects development, it is not a user-facing change.
2023-06-02 13:04:58 -07:00
Hood Chatham 78084ef07c
Fix llvm-readobj when emscipten is installed with emsdk out of tree (#3840) 2023-05-08 17:34:00 -07:00
Hood Chatham 3a231a7822
NFC Fix llvm-readobj path hack (#3833)
By linking llvm-readobj into an emscripten directory which is on the path
2023-05-06 13:49:06 -07:00
Hood Chatham 4d09958ba0
Emscripten 3.1.29 (#3408) 2023-01-04 09:30:46 +09:00
Hood Chatham 8560319738
Make fs timestamps have millisecond resolution rather than second resolution (#3313)
Resolves https://github.com/pyodide/pyodide/issues/3311
2022-12-10 09:50:08 -08:00
Hood Chatham 2df7a286ee
Emscripten 3.1.26 (#3280) 2022-11-21 17:34:49 -08:00
Hood Chatham 3692ff8b22
Emscripten 3.1.25 (#3239)
Co-authored-by: Gyeongjae Choi <def6488@gmail.com>

Adds a patch reverting an Emscripten commit that dropped a freetype patch.
2022-11-14 13:44:29 -08:00
Hood Chatham 3dfe5b35ef
Emscripten 3.1.23 (#3148) 2022-11-07 08:51:24 -08:00
Gyeongjae Choi a916ea0b34
BLD simplify building CMake based packages (#3128)
This PR makes building CMake based packages easier.
- Introduce a custom toolchain file for Pyodide. It inherits most of settings from the original Emscripten toolchain file with some modifications. Packages built by pyodide-build will automatically use that toolchain file.
- Proxy cmake in pywasmcross.py, in order to proxy other compiler toolchains.
2022-09-22 10:42:26 +09:00