Граф коммитов

22061 Коммитов

Автор SHA1 Сообщение Дата
Sam Clegg 0c32a9940b
Rebaseline code size tests after llvm change. NFC (#13286) 2021-01-20 06:27:58 -08:00
Sam Clegg 4b78241b3e
Remove redundant zero'ing of pthread fields. NFC. (#13273)
The spawnThread function is only even called with struct that
have already been zero-initialized in pthread_create.
2021-01-19 12:34:55 -08:00
Sam Clegg a0e9b4e19d
Remove redundant USE_THREADS macro in system_libs.py. NFC (#13274)
We already automatically define `__EMSCRIPTEN_THREADS__` in emcc.py
whenever `-s USE_PTHREADS` is enabled.
2021-01-19 12:33:40 -08:00
Sam Clegg d7c7aedf45
Use individual socket syscalls. (#13272)
Remove the SYSCALL_USE_SOCKETCALL definition which was causing
musl to use a single syscall for all socket calls (a mostly legacy
linux convention apparently).

This is much better for emscripten because it allows DCE and more
precise dependencies.
2021-01-19 06:50:16 -08:00
Sam Clegg 39c848cd37
Add generic musl arch headers. NFC. (#13280)
This allows us to then remove some of our emscripten-specific
arch headers that are not longer needed (since they do not
differ from the generic version).

This is part of making musl updates easier.

See #7279
2021-01-19 06:11:38 -08:00
Sam Clegg ee483fc6c3
test_other: use self.do_runf where it makes sense. NFC. (#13275) 2021-01-18 09:48:00 -08:00
Sam Clegg 540d3ba161
Fix definition of mtx_t and cond_t (#13271)
The convention is musl is to duplicate these types rather than
typedef them.

Fixes: #5343
2021-01-18 08:40:41 -08:00
Sam Clegg 4df80934f7
Move emscripten-specific source files out of musl directory (#13268)
This allows for us to more easily manage/maintain/upgrade the
musl directory as a fork of upstream.
2021-01-18 08:20:59 -08:00
Sam Clegg 0e92f931e6
Improve error message when check for multiple of page size (#13279)
Also:
- remove duplication of wasm page size specification
- remove old reference to asm.js

Fixes: #13277
2021-01-18 08:18:22 -08:00
Sam Clegg 279b7f8780
test: remove two unneeded include paths. NFC. (#13276) 2021-01-18 07:51:53 -08:00
Sam Clegg ba2b891d88
Remove out copyright from some upstream sources. NFC (#13278) 2021-01-18 07:25:55 -08:00
Sam Clegg 72d6ae302d
Remove need to `getQuoted` by using seperate template pattern (#13265)
Use <<< >>> for late-substitution replacements as opposed to {{{ }}}
which is used to by the JS compiler.

This avoids the somewhat confusing getQuoted function which works as
an escape hatch.
2021-01-15 09:02:57 -08:00
Sam Clegg ae09c9db85
Don't include webgl2.c in regular gl library (#13261)
This fixes big where linking MAIN_MODULE and libgl was bring in
undefined references to GL2 symbols.  Normally including this extra
`webgl.c` file in the library would be harmless since it will be ignored
if no GL2 symbols are used.

However, with MAIN_MODULE mode all objects from all libraries are
included which means that webgl2.o is included which itself references
all webgl2 symbols.

The problem specifically is that `webgl2.c` includes 
`emscripten_webgl2_get_proc_address` which in turn references all
the `emscripten_XXX` versions of the GL2 API such as
`emscripten_glReadBuffer` which are defined in `library_webgl2.js`

Fixes: #13101
2021-01-15 07:18:53 -08:00
Sam Clegg 3307679290
Simplify handling of forwarded JS compiler metadata. NFC. (#13264)
This class/code used to do a lot more in the past so it made sense
to have a separate class.  Now that the logic is simpler we can just
directly die the metadata for a further simplification.
2021-01-15 06:06:07 -08:00
Dexter Chua 36a3fa596f
[NFC] Be clearer about not generating DataRequest if lz4 is used (#13218) 2021-01-14 13:44:43 -08:00
juj 7684d4ad34
Remove old leftover MEMFS code (#13255)
* In PR #7918, the option MEMFS_APPEND_TO_TYPED_ARRAYS=0 was removed, dropping the support for using regular JS Arrays to back MEMFS file storage. In this PR, complete the removal of old code that related to JS Array backing, since all files are now typed array backed.

* Migrate tests to use the MEMFS typed array API.

* Fix tests.
2021-01-14 23:24:45 +02:00
Sam Clegg 5ee8fe3ff0
Initial support for pthreads + dynamic linking (#13245)
This support is still experimental and has some major
caveats:

- Only supports load-time dynamic linking
- No support for sharing TLS data between dylibs.

The major change is that workers now also call the module `run` function
although they exit early, once dynamic libraries have all been loaded.

See: #3494
2021-01-14 12:32:29 -08:00
Sam Clegg 5fb1d65d51
Use addAtExit in __postset. NFC. (#13254)
When registering atexit handlers in __postset functions the convention
elsewhere seems to be to prefer this helper function (which does
nothing when EXIT_RUNTIME is not set).
2021-01-14 11:56:12 -08:00
Sam Clegg a577171cc3
Avoid special replacements for STACK_BASE/STACK_MAX/HEAP_BASE (#13253)
Rather then using `getQuoted` and then special-case replacements for
pre/post we can just use internal settings.

This has the advantage that these settings can be included in library
code as we as the pre/post js.

After this change getQuoted now only has a couple of remainging
uses for ATINITS, ATEXITS, ATMAINS and WASM_BINARY_DATA
2021-01-14 11:34:32 -08:00
Raffarti 259e2ee58f
Fix `alcCaptureSamples` (#13178)
- Properly read from the circular buffer (fixes #13173)
- Fix requested frame count check (it was failing when requested frequency was higher than source frequency)
2021-01-14 11:33:57 -08:00
Alon Zakai 9feb504166
Warn on failure to load from a file URI. Fixes #13207 (#13215) 2021-01-13 17:15:29 -08:00
Alon Zakai 428f33aee2
Do not process main thread queued calls while returning a worker to the pool (#13233)
Fixes #12970
2021-01-13 17:14:59 -08:00
Kagami Sascha Rosylight 97f13a10ad
Add libgif port (#13139)
This is useful in building the JPEG XL reference software, for example.
2021-01-13 14:56:33 -08:00
Sam Clegg c5cde8ace3
Cleanup test_size.cpp. NFC. (#13247)
- Fix memory leak.
- Re-enable in safe heap mode (seems to pass just fine).
- Fix indentation.
2021-01-13 14:26:11 -08:00
Sam Clegg ea208ffca0
Re-enable some disabled browser tests. NFC (#13244) 2021-01-13 14:09:18 -08:00
Sam Clegg 04e7685612
Extract stackCheckInit() function from run(). NFC (#13246)
Split out from #13245.
2021-01-13 06:06:49 -08:00
Alon Zakai f58135043a
Disable a flaky recently-added test, asan.test_pthread_cxx_threads (#13242) 2021-01-12 14:18:57 -08:00
Adam Leskis 63422ac7ea
[docs] Update http to https (#13225) 2021-01-12 12:31:41 -08:00
Sam Clegg 6df2aae399
Use JS naming convention for fetch JS functions (#13238)
The strange mixed naming convention used here exposed a bug in
jsifier.  See: #13230
2021-01-12 10:46:39 -08:00
Sam Clegg 3c7a8663bb
Fix MODULARIZE + PTHREADS + USE_OFFSET_CONVERTER (asan) (#13236)
Fixes: #13138
2021-01-12 10:45:57 -08:00
Sam Clegg 1050ed30cd
Add basic/empty test of C++ threads. NFC. (#13237) 2021-01-12 05:34:10 -08:00
Alon Zakai c168284ec8
[docs] Some fixes for packaging docs (#13234) 2021-01-11 15:43:33 -08:00
Kleis Auke Wolthuizen d1d1147bb4
Cleanup pthread tests. NFC. (#13211) 2021-01-11 14:48:06 -08:00
Amin Yahyaabadi 8e885f7b61
[docs] Add Windows package to the packaging section (#13149)
Fixes emscripten-core/emsdk#272

I added the packages to the bottom of the downloads page, instead of
a hidden mention in a very large note.
2021-01-11 14:45:57 -08:00
Alon Zakai c978e1e4db
[docs] Mention SINGLE_FILE alongside the local webserver docs. see #13207 (#13232) 2021-01-11 14:44:39 -08:00
Sam Clegg e099eca3f4
Avoid mangling + demangling in jsifier.js (#13230)
We had a bug that only showed up with symbols that start with `$_`.
These happen to exist in `library_fetch.js` e.g:
`$__emscripten_fetch_xhr`.  In this case, when we mangle, we remove the
leading `$` giving `__emscripten_fetch_xhr`, and then if we demangle we
do that wrong thing and end up removing the `_` instead of re-adding the
  `$`.

This change avoids the round trip by always storing both the mangled
and demangled version of a given symbol.

See #12268
2021-01-11 14:44:25 -08:00
Sam Clegg ad430828f2
Fix strange/broken syntax in __resumeException__deps (#13231)
Its hard for me to tell exactly what this was originally trying
to express, but right now it looks broken.

Prior to bcf60cea I think it might
have made more sense when the function was just one element of the
list, but then with bcf60cea it became a function with the list inside
it as expressions that do nothing.
2021-01-11 14:44:07 -08:00
Sam Clegg 75095c1e96
Move simd compatability headers to `compat` (#13170)
We want these files to take presence over the clang builtin
include so we put them in the compat directory which is explictly
added to include path and therefore comes before clang's builtin
include directory.
2021-01-11 11:20:13 -08:00
Sam Clegg dee59ba46a
Restore orginal file layout for musl and libcxx. NFC. (#13154)
Now that we build the sysroot, including the header tree programatically
we can restore the original layout of the musl and libcxx directories.

This will make future updates and comparisons with upstream easier.
2021-01-11 09:41:01 -08:00
Sam Clegg bbec22890a
Allow overriding STRICT mode setting (#13229)
STRICT mode enables a bunch of other settings but it should still be
possible to individually re-enable them.
2021-01-11 08:39:44 -08:00
Sam Clegg 9a1d041e91
tests: switch more tests to btest_exit. NFC. (#13018)
Thus avoiding the need for REPORT_RESULT.
2021-01-11 06:46:47 -08:00
Sam Clegg 44add0c5d0
tests: fix check_dlfcn check (#13228)
I broke this change when I landed #13201.
2021-01-11 04:51:40 -08:00
Sam Clegg ba88a7c765
Bump binaryen version (#13222) 2021-01-11 04:16:52 -08:00
Sam Clegg 298b2af371
Build a complete sysroot in the cache directory (#13090)
Rather than adding various include paths, copy any needed headers into
the sysroot along with any libraries.

This means that emscripten can work a lot more like the
traditional cross compiler (e.g. clang -target=xxx --sysroot=yyy),
and we can start to think of the emscripten driver as a seperate
thing to the sysroot.

Fixes: #9353
2021-01-10 04:09:02 -08:00
Kleis Auke Wolthuizen ae6f40d7d1
Update posixtestsuite and disable newly failing tests. NFC. (#13059)
Previously the testsuite had been modified to disable them.

See: https://github.com/emscripten-core/posixtestsuite/pull/4.
2021-01-09 11:22:05 -08:00
Sam Clegg 61721baa32
Feedback from #13213 (#13216) 2021-01-09 08:23:50 -08:00
Sam Clegg 38f85eeb1c
2.0.12 (#13221) 2021-01-09 08:21:25 -08:00
Sam Clegg d0e647bf26
Use single cache rather then reconfiguring/moving it (#13209)
This was split out from the change to use a single sysroot (#13090).  I
think it cleaner this way: There is single cache, with single lock file
and the root doesn't change, but the libraries live in sub-directories
within the cache.
2021-01-08 15:25:07 -08:00
Sam Clegg 91a177b3ad
Remove remnands of WebVR support (#13210)
See initial removal or the library in #10460.
2021-01-08 14:45:48 -08:00
Sam Clegg 96bd26ca8a
tests: use `delete_contents` helper function. NFC. (#13208) 2021-01-08 14:45:30 -08:00