Commit Graph

40 Commits

Author SHA1 Message Date
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 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 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 8c5627fe4c
MAINT Fix emscripten patch paths (#2276)
Having to add `emsdk/upstream/emscripten` to all the emscripten patches is a
nuisance. If at some point we want to patch a file in a different folder, we can
separate the patches into multiple folders. In particular this should make it
easy to migrate patches using `git am`, `git rebase`, and `git format-patch`.
2022-03-15 13:52:21 -07:00
Hood Chatham 19261f394c
Remove function pointer cast emulation (#2019) 2021-12-09 10:31:21 -08:00
Hood Chatham 6ce70a5bf7
MAINT Rearrange emsdk Makefile to do less stuff before applying patches (#1938) 2021-11-09 21:46:59 -08:00
Roman Yurchak aa1ce3adc4
BLD Use outer ccache wrapper (#1805) 2021-09-11 14:22:13 +02:00
Gyeongjae Choi cc78bced5b
ENH Remove CMake -S and -B options from emsdk/Makefile (#1711) 2021-07-12 17:09:43 +02:00
Dexter Chua eb2bd5c458
Allow changing emscripten version with env var (#1249)
This makes it easier to test against different emscripten versions on
the same tree (e.g. tot a la #1223).
2021-02-14 12:17:20 +01:00
Roman Yurchak 1aea60d91d
MAINT Update to emscripten 2.0.13 (#1198)
Co-authored-by: Dexter Chua <dalcde@users.noreply.github.com>
2021-02-10 09:23:10 +01:00
Dexter Chua 56073be2a9
Re-enable ccache for binaryen build (#1214)
Binaryen now invokes cc instead of gcc, and the cc symlink isn't in
/usr/lib/ccache. This replaces the implementation in #1014.

This has the disadvantage that build is now broken if ccache is not
available.
2021-02-08 09:42:43 +01:00
joemarshall 1bd8380c01
Emscripten 2.0.12 Upstream backend (#1102)
Co-authored-by: Dexter Chua <dalcde@users.noreply.github.com>
Co-authored-by: Roman Yurchak <rth.yurchak@gmail.com>
2021-02-06 08:58:12 +01:00
Dexter Chua 2454c483d6
git clone --depth 1 emsdk (#1063) 2021-01-07 09:01:25 +01:00
Dexter Chua f6f5da1145
Create script to set emscripten env vars (#1013) 2021-01-03 12:25:14 +01:00
Dexter Chua c42c81d650
Enable ccache for emsdk (#1014) 2021-01-02 21:03:45 +08:00
Dexter Chua 2ffd31284c
Only build wasm-opt in binaryen (#1012) 2021-01-02 19:40:35 +08:00
Dexter Chua 25de5b6016
BLD Refactor emsdk/Makefile (#827)
1. Split long shell command into multiple commands
2. Make BINARYEN_VERSION a variable instead of hardcoding in Makefile
3. Set Makefile.envs and patches as dependencies
2020-12-06 11:36:37 +01:00
Roman Yurchak f7adad7eb3
Upgrade to emscripten 1.38.34 with fastcomp (#480)
Co-authored-by: Dexter Chua <dec41@srcf.net>
2020-11-30 18:54:35 +01:00
Roman Yurchak 4ee8dedeed
Update to emscripten 1.38.31 (#674)
Co-authored-by: Michael Droettboom <mdboom@gmail.com>
2020-05-28 18:13:51 +02:00
Adam Seering 6a02cabaad Update to use sdk-fastcomp-tag-<version> for emscripten (#589)
* Update to use sdk-fastcomp-tag-<version> for emscripten, as sdk-tag-<version> is no longer available upstream.
* Update code to use new path
* Replace Circle-CI CPU_CORES hack with environment variables (now supported upstream)

Co-authored-by: AndyLockhart <AndyLockhart@users.noreply.github.com>
2019-12-31 12:09:39 -05:00
Michael Droettboom 047b414f3d
Upgrade to emscripten 1.38.30 (#374) 2019-04-04 07:57:47 -04:00
Michael Droettboom 30b4fb16af Fix logic 2019-01-10 14:08:58 -05:00
Michael Droettboom 4b3bfe53ad Upgrade emscripten to 1.38.22 2019-01-10 07:40:01 -05:00
Michael Droettboom 58048cff2c Upgrade to emscripten 1.38.12 2018-10-01 18:56:57 -04:00
Michael Droettboom 362b736c0a Simplify library_lz4.js 2018-09-20 08:25:44 -04:00
Michael Droettboom 7f578a81e2 Fix library_lz4.js 2018-09-19 16:44:54 -04:00
Michael Droettboom 0d4b22ba77 Use LZ4 filesystem compression, using the canonical C implementation 2018-09-19 16:44:54 -04:00
Michael Droettboom 3c08f1541d Fix emsdk build 2018-07-24 17:47:49 -04:00
Michael Droettboom 4153f5bc83 Update emscripten to 1.38.10 2018-07-24 17:47:49 -04:00
Michael Droettboom 10785faa9b Fix rebuilding of emsdk 2018-07-19 20:33:56 -04:00
Michael Droettboom 6c2d77979f Use a file, rather than a directory as the target for OSX compat 2018-07-19 08:14:31 -04:00
Michael Droettboom a0046f2799 Fix #80: Delete emsdk if rerunning make 2018-07-18 18:45:20 -04:00
Michael Droettboom 6e1ac55eec Forcibly copy binaryen executable 2018-07-10 18:28:34 -04:00
Michael Droettboom c3a228e6ca Patch in a different way that hopefully won't fail 2018-07-10 16:24:48 -04:00
Michael Droettboom 6153e635e0 Add Circle-CI configuration 2018-06-04 16:17:03 -04:00
Michael Droettboom f2e46063d6 Pin the compiler to a particular version 2018-05-31 18:46:57 -04:00
Michael Droettboom deea97cd4c Use pre-built toolchain 2018-04-02 13:06:36 -04:00
Michael Droettboom b8c3e600c2 Add end-to-end build. Travis tests. 2018-03-30 13:08:06 -04:00