-
Notifications
You must be signed in to change notification settings - Fork 3.3k
/
ChangeLog.md
5156 lines (4751 loc) · 259 KB
/
ChangeLog.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
This document describes changes between tagged Emscripten SDK versions.
Note that version numbers do not necessarily reflect the amount of changes
between versions. A version number reflects a release that is known to pass all
tests, and versions may be tagged more or less frequently at different times.
Note that there is *no* ABI compatibility guarantee between versions - the ABI
may change, so that we can keep improving and optimizing it. The compiler will
automatically invalidate system caches when the version number updates, so that
libc etc. are rebuilt for you. You should also rebuild object files and
libraries in your project when you upgrade emscripten.
Not all changes are documented here. In particular, new features, user-oriented
fixes, options, command-line parameters, breaking ABI changes, deprecations,
significant internal modifications and optimizations etc. generally deserve a
mention. To examine the full set of changes between versions, you can use git
to browse the changes between the tags.
See docs/process.md for more on how version tagging works.
3.1.25 (in development)
-----------------------
- The `TOTAL_STACK` setting was renamed to `STACK_SIZE`. The old name will
continue to work as an alias. (#18128)
- Exporting `print`/`printErr` via `-sEXPORTED_RUNTIME_METHODS` is deprecated in
favor of `out`/`err`. The former symbols are supposed to be used with
`-sINCOMING_MODULE_JS_API` instead. (#17955)
- aio.h was removed from the sysroot. Emscripten doesn't support any of the
functions in this header.
- Clang's function pointer cast warnings (enabled with `-Wcast-function-type`)
are now stricter. This warning is intended to help with CFI errors but also
helps wasm builds since wasm traps on such type mismatches in indirect calls.
We recommend that users enable it to prevent such errors (which can be hard to
debug otherwise). The older (less strict) behavior is also still possible with
`-Wcast-function-type -Wno-cast-funtion-type-strict` (or
`-Wno-error=cast-function-type-strict` if you want the warnings to be visible
but not errors). See https://reviews.llvm.org/D134831
- libcxx and libcxxabi updated to LLVM 15. (#18113)
3.1.24 - 10/11/22
-----------------
- In Wasm exception mode (`-fwasm-exceptions`), when `ASSERTIONS` is enabled,
uncaught exceptions will display stack traces and what() message. (#17979 and
#18003)
- It is now possible to specify indirect dependencies on JS library functions
directly in C/C++ source code. For example, in the case of a EM_JS or EM_ASM
JavaScript function that depends on a JS library function. See the
`EM_JS_DEPS` macro in the `em_macros.h` header. Adding dependencies in this
way avoids the need to specify them on the command line with
`-sDEFAULT_LIBRARY_FUNCS_TO_INCLUDE`. (#17854)
3.1.23 - 09/23/22
-----------------
- The `__EMSCRIPTEN_major__/minor__/tiny__` macros are no longer defined on the
command line but require `<emscripten.h/>` (or just `<emscripten/version.h>`
to be included. (#17883)
- Linking of bitcode files using `emcc -r` + `-flto` is no longer supported.
`emcc -r` will now always use lld to link to an object file. This matches the
behavior of upstream llvm where bitcode linking using lld does not exist.
The recommend way to combine bitcode input is to use library files (`ar`
archives). See #13492 for more details.
3.1.22 - 09/19/22
-----------------
- compiler-rt updated to LLVM 15. (#17802)
- Using `-Oz` or `-Os` will no longer pass `-fno-inline-functions` to clang and
instead rely on clang's normal inline heuristics for these optimization
levels. `-fno-inline-functions` can be passed explicitly if needed.
- C++17 is now the default version of the C++ standard used by the compiler.
This is due to an upstream change in llvm. Use `-std=c++14` (or technically
`-std=gnu++14`) to revert to the previous default.
- Closure warnings are now controlled via the standard `-Wclosure` warning flags
rather than via a specific/custom `CLOSURE_WARNINGS` setting. The old
setting continues to work but will issue a deprecation warning.
If you link with `-Werror` but you don't want closure warnings to be errors
you can add `-Wno-error=closure` or `-Wno-closure`.
3.1.21 - 09/09/2022
-------------------
- Update SDL2 port to 2.24.0 (#17748)
- The `LEGACY_RUNTIME` setting is no longer enabled by default. If you use any
of these legacy runtime functions (except in library code with explicit
dependencies) then you would need to set `LEGACY_RUNTIME` on the command line
or add the ones you need to `DEFAULT_LIBRARY_FUNCS_TO_INCLUDE`:
- addFunction
- removeFunction
- allocate
- AsciiToString
- stringToAscii
- UTF16ToString
- stringToUTF16
- lengthBytesUTF16
- UTF32ToString
- stringToUTF32
- lengthBytesUTF32
- allocateUTF8
- allocateUTF8OnStack
- writeStringToMemory
- writeArrayToMemory
- writeAsciiToMemory
- intArrayFromString
- intArrayToString
- warnOnce
- ccall
- cwrap
Although this is technically a breaking change for those who use these
functions, there are assertion in debug builds that catch such usages and
direct towards how to fix the issue.
3.1.20 - 08/24/2022
-------------------
- The `getTempRet0`/`setTempRet0` helper functions are now implemented directly
in WebAssembly, rather than supplied by the JS host. This simplifies the
wasm/JS interface. These function are no longer exported in all cases. If
your code directly calls these functions from JS, you can add them to
`-sEXPORTED_RUNTIME_METHODS`.
- Several linux-specific headers were removed from the emscripten sysroot. None
of the functionality in these headers was ever supported by emscripten. For
example `sys/soundcard.h` and `sys/ptrace.h`. (#17704)
3.1.19 - 08/17/2022
-------------------
- Old method of metadata extraction via wasm-emscripten-finalize removed
in favor of local python code. (#16529)
3.1.18 - 08/01/2022
-------------------
- The tests/ directory was renamed to just test/ to match other project close
emscripten (llvm, wabt, binaryen). This should not effect any users of
emscripten, only developers. (#17502)
- The llvm version that emscripten uses was updated to 16.0.0 (#17534)
- worker.js now propagates unhandled promise rejections to the main thread the
same way it propagates uncaught exceptions.
3.1.17 - 07/22/2022
-------------------
- Add support for dynamic linking with Asyncify. (#15893)
- A source map file and DWARF info in the wasm can now be emitted at the same if
the user gives the both options: `-g -gsource-map`. (#17484)
- The `align` argument to the makeGetValue/makeSetValue JS library macros was
removed (and replaced with an assert) as it had no uses internally and was
removed (and replaced with an assert) as it had now uses internally and was
untested.
- Removed unused `calledMain` global variable from the JS runtime. Folks who
want to know when main is done can use `Module[postRun]`.
3.1.16 - 07/14/2022
-------------------
- Warnings generated by the JS compiler (compiler.js) are now propagated back
to the emcc compiler driver which means that `-Werror` builds will now fail
in the presence of JS compiler warnings. As usual `-Wno-js-compiler` and
`-Wno-error=js-compiler)` can be used to control these warnings. (#17365)
- When JS library functions are included as part of `EXPORTED_RUNTIME_METHODS`
it is no longer necessary to also add them to
`DEFAULT_LIBRARY_FUNCS_TO_INCLUDE`. This change allows us to transition
runtime functions to JS library functions without the need to folks to add
`DEFAULT_LIBRARY_FUNCS_TO_INCLUDE`. (#17369)
- The following function, which were previously part of the default runtime, are
now JS library functions:
- addFunction
- removeFunction
- allocate
- AsciiToString
- stringToAscii
- UTF16ToString
- stringToUTF16
- lengthBytesUTF16
- UTF32ToString
- stringToUTF32
- lengthBytesUTF32
- allocateUTF8
- allocateUTF8OnStack
- writeStringToMemory
- writeArrayToMemory
- writeAsciiToMemory
- intArrayFromString
- intArrayToString
- warnOnce
- ccall
- cwrap
However, they all still available by default due to a new setting called
`LEGACY_RUNTIME` which is enabled by default. When `LEGACY_RUNTIME` is
disabled (which it may be in the future) these symbols would only be included
if there were explictly exported via `EXPORTED_RUNTIME_METHODS` or added to
`DEFAULT_LIBRARY_FUNCS_TO_INCLUDE`. `LEGACY_RUNTIME` is disabled by default
in `STRICT` mode so this change only effects users of `STRICT` mode. (#17370,
#17403)
- The `run` runtime function is no longer exported by default. It can be added
to `EXPORTED_RUNTIME_METHODS` if needed.
- The getWasmTableEntry/setWasmTableEntry library function are no longer
included by default. Add them to `DEFAULT_LIBRARY_FUNCS_TO_INCLUDE` or
`EXPORTED_RUNTIME_METHODS` if you want to use them outside of JS library code.
- The type of `time_t` was restored 64-bit after being converted to 32-bit in
3.1.11. (#17401)
3.1.15 - 07/01/2022
-------------------
- The JS library helper function `hasExportedFunction` has been replaced with
`hasExportedSymbol`, which takes an unmangled (no leading underscore) symbol
name.
- Post-link metadata extraction switched from wasm-emscripten-finalize
(binaryen) to python code within emscripten. This change should have no
semantic effect, but can temporarily be reverted by setting
`EMCC_READ_METADATA=binaryen` in the environment. (#17337)
- Added a shim for `BigInt64Array` so `-sWASM_BIGINT` can be used in Safari
v14. (#17103)
3.1.14 - 06/20/2022
-------------------
- emcc now accepts `-print-file-name` and reports the correct library paths in
`-print-search-dirs`.
- `tools/file_packager` no longer generates (or requires) any "pre-js" code when
running in `--embed-file` mode. Instead the embedded files are loaded at
static constructor time.
- Emscripten now knows what minimum browser versions the `WASM_BIGINT` feature
requires and will automatically set the defaults accordingly. (#17163)
- Embind now supports binding to functions specified as `noexcept`. (#17140)
- Weak undefined symbols fixed in dynamic linking. (#17164)
- Internally, the name of `main` function now gets mangled (by clang) in the
same way as with other wasm targets. This means that within the wasm module
the name of the main function can now be `__main_argc_argv`, but, since we
still export this to JS as `_main`, this should not be a user-visible change.
- Use of pkg-config from cmake not longer causes the C++ include path to be
broken. (#17137)
- `emscripten_runtime_keeplive_push()` and `emscripten_runtime_keeplive_push()`
are now exposed to native code and can be used to keep the runtime alive
without immediately unwinding the event loop (as
`emscripten_exit_with_live_runtime()` does). (#17160)
- The file packager option `--use-preload-cache` now only invalidates the
cache if the data contents has changed. (#16807)
3.1.13 - 06/02/2022
-------------------
- xlocale.h compatibility header was restored after being removed in 3.1.12.
3.1.12 - 05/25/2022
-------------------
- Fix crash, introduced in 3.1.11, which occurred when using pointer types
(types ending in `*`) with getValue/setValue library functions. (#17028)
- Fix possible deadlock in multi-threaded builds that use EXIT_RUNTIME=0 with
ASSERTIONS enabled. This was introduced in 3.1.3 as part of #16130. (#17044)
3.1.11 - 05/21/2022
-------------------
- The return value of `emscripten_get_compiler_setting` was changed from `int`
to `long` so that it is compatible with `MEMORY64`. The return value of this
function sometimes contains a pointer value so `int` is not sufficiently
wide under `wasm64`. (#16938)
- The `EM_BUILD_VERBOSE` environment variable only effects test code these days
and therefore was renamed to `EMTEST_BUILD_VERBOSE`. (#16904)
- compiler-rt updated to LLVM 14. (#16991)
- libc++ updated to LLVM 14. (#17000)
- libc++abi updated to LLVM 14. (#16993)
3.1.10 - 05/02/2022
-------------------
- Bug fixes
3.1.9 - 04/21/2022
------------------
- The `-sSHELL_FILE` setting, which (unlike the --shell-file command line
options) we believe was never tested or externally used, has been removed.
(#16589)
- A warning is now issued when passing C++-only settings such
`-sEXCEPTION_CATCHING_ALLOWED` when not linking as C++. (#16609)
- Introduce a new [proxying
API](https://emscripten.org/docs/api_reference/proxying.h.html) for proxying
work between threads.
3.1.8 - 03/24/2022
------------------
- Command line settings (`-s`) are now type checked. For example, passing a
string to a boolean setting will now generate an error (e.g.
`-sEXIT_RUNTIME=foo`). Previously, the value of `foo` would have have been
interpreted as non-zero and accepted as valid. (#16539)
- A warning (limited-postlink-optimizations) was added that gets shown when
binaryen optimizations are limited due to DWARF information being requested.
Several binaryen passed are not compatible with the preservation of DWARF
information. (#16428)
- Use normalized mouse wheel delta for GLFW 3 in `library_glfw.js`. This changes
the vertical scroll amount for GLFW 3. (#16480)
- The emsdk binaries for macOS now require macOS 10.14 Mojave (or above).
Prior versions of emsdk could run on 10.11 (or above), but supporting those
older versions recently became harder.
- The SDL_mixer library can be configured to support MIDIs by passing "mid"
to the SDL2_MIXER_FORMATS setting. It uses Timidity, and you must provide
your own instrument sound files and mount them at "/etc/timidity". (#16556)
3.1.7 - 03/07/2022
-------------------
- Remove unmaintained ASMFS filesystem backend and associated `-sASMFS`
settings. The new wasmfs filesystem is far enough along that it seems clear
that ASMFS will not need to be revived.
- Fix deadlock in `munmap` that was introduced in 3.1.5. The deadlock would
occur in multi-threaded programs when a partial unmap was requested (which
emscripten does not support). (#16413)
- Added new compiler+linker option -sSHARED_MEMORY=1, which enables targeting
a shared WebAssembly.Memory. (#16419)
- Added new API "Wasm Workers", which is an alternative to pthreads for building
multithreaded applications, enabled via -sWASM_WORKERS=1 (#12833)
3.1.6 - 02/24/2022
------------------
- Remove support for deprecated `EMMAKEN_COMPILER`, `EMMAKEN_CFLAGS`, and
`EMMAKEN_NO_SDK` environment variables. These are all legacy and redundant
in the face of other settings/flags:
- `EMMAKEN_COMPILER` -> `LLVM_ROOT` in the config settings
- `EMMAKEN_CFLAGS` -> `EMCC_CFLAGS`
- `EMMAKEN_NO_SDK` -> standard `-nostdlib` and `-nostdinc` flags
- emscripten will no longer automatically create a config file if it can't
find one in the configured location. Instead, it will error out and point the
user to the `--generate-config` option, in case that is what they want.
(#13962)
3.1.5 - 02/17/2022
------------------
- Emscripten no longer uses the `allocate()` runtime function. For backwards
compatabiliy with external JS code we still include this function by default
but it will no longer be included in `-sSTRICT` mode. Usages of this function
are generally best replaced with `_malloc`, `stackAlloc` or `allocateUTF8`.
3.1.4 - 02/14/2022
------------------
- Due to an llvm change (https://reviews.llvm.org/D118573) some clang flags
that did not previously have any effect are now honored (e.g.
`-fnew-alignment` and `-fshort-wchar`).
- llvm dependency updated to 15.0.0 to match upstream. (#16178)
- The `__EMSCRIPTEN_major__`, `__EMSCRIPTEN_minor__` and `__EMSCRIPTEN_tiny__`
macros are now available via the `emscripten/version.h` header file. For the
time being, unless you enable `-sSTRICT`, these are still also defined
directly on the command line. If you use these macros please make sure you
include `emscripten/version.h` (or `emscripten.h` which indirectly includes
it). (#16147)
3.1.3 - 01/31/2022
------------------
- The file packager now supports embedding files directly into wasm memory and
`emcc` now uses this mode when the `--embed-file` option is used. If you
use `file_packager` directly it is recommended that you switch to the new mode
by adding `--obj-output` to the command line. (#16050)
- The `--bind` flag used to enable embind has been deprecated in favor of
`-lembind`. The semantics have not changed and the old flag continues to
work. (#16087)
- New setjmp/longjmp support using Wasm EH instructions is added, which is
faster and reduces code size. You need a browser that supports Wasm EH spec to
use it. The new SjLj support is enabled by `-sSUPPORT_LONGJMP=wasm`. This can
be used with Wasm exception support (`-fwasm-exceptions`), but not with
Emscripten exception support (`-fexceptions` or
`-sDISABLE_EXCEPTION_CATCHING=0`). When using Wasm EH with Wasm SjLj, there is
one restriction that you cannot directly call `setjmp` within a `catch`
clause. (Calling another function that calls `setjmp` is fine.)
(#14976 and #16072)
3.1.2 - 01/20/2022
------------------
- A new setting, `POLYFILL`, was added which is on by default but can be disabled
(via `-sNO_POLYFILL`) to prevent emscripten from outputing needed polyfills.
For default browser targets, no polyfills are needed so this option only has
meaning when targeting older browsers.
- `EVAL_CTORS` has been rewritten and improved. The main differences from before
are that it is much more capable (it can now eval parts of functions and not
just all or nothing, and it can eval more wasm constructs like globals). It is
no longer run by default, so to use it you should build with `-s EVAL_CTORS`.
See `settings.js` for more details. (#16011)
- `wasmX` test suites that are defined in `test_core.py` have been renamed to
`coreX` to better reflect where they are defined. The old suite names such
as `wasm2` will continue to work for now as aliases.
3.1.1 - 01/08/2022
------------------
- Happy new year!
- Updated SDL 2 port to upstream version 2.0.18 (from a patched 2.0.10). This
includes all downstream patches and many upstream changes.
- libc++ library updated to llvm-13. (#15901)
- libc++-abi library updated to llvm-13. (#15904)
- compiler-rt library updated to llvm-13. (#15906)
- Added new internal/debugging related environment variable
EM_FORCE_RESPONSE_FILES that can be set to 0 to force disable the use of
response files, and to 1 to force enable response files. If not set,
response files will be used if command lines are long (> 8192 chars). (#15973)
3.1.0 - 12/22/2021
------------------
- Emscripten in starting to use ES6 features in its core libraries (at last!).
For most users targeting the default set of browsers this is a code size win.
For projects targeting older browsers (e.g. `-sMIN_CHROME_VERSION=10`),
emscripten will now run closure compiler in `WHITESPACE_ONLY` mode in order to
traspile any ES6 down to ES5. When this automatic transpilation is performed
we generate a warning which can be disabled (using `-Wno-transpile`) or by
explicitly opting in-to or out-of closure using `--closure=1` or
`--closure=0`. (#15763).
3.0.1 - 12/17/2021
------------------
- Deprecate `EMMAKEN_CFLAGS` is favor of `EMCC_CFLAGS`.
- Fixed an issue where user provided --js-library directives would not be
processed as the last item after all system provided JS libraries have been
added to the build. This fix enables overriding WebGL 2 symbols from user JS
libraries.
3.0.0 - 11/22/2021
------------------
- A set of internally-unused functions were removed from `parseTools.js`. While
emscripten no longer needs any of these functions, there is slim chance that
some external JS library is depending on them. Please file issues if any such
library code is found. The removed/unused functions are:
`removePointing`, `pointingLevels`, `removeAllPointing`, `isVoidType`,
`isStructPointerType`, `isArrayType`, `isStructType`, `isVectorType`,
`isStructuralType` `getStructuralTypeParts`, `getStructuralTypePartBits`,
`isFunctionDef`, `isPossiblyFunctionType`, `isFunctionType`, `getReturnType`,
`splitTokenList`, `_IntToHex`, `IEEEUnHex`, `Compiletime.isPointerType`,
`Compiletime.isStructType`, `Compiletime.INT_TYPES`, `isType`.
- The example `shell.html` and `shell_minimal.html` templates no longer override
`printErr` on the module object. This means error message from emscripten and
stderr from the application will go to the default location of `console.warn`
rather than `console.error`. This only effects application that use the
example shell html files.
- The version of musl libc used by emscripten was upgraded from v1.1.15 to
v1.2.2. There could be some minor size regressions (or gains) due to changes
in upstream musl code but we don't expect anything major. Since this is a
fairly substantial change (at least internally) we are bumping the major
version of Emscripten to 3. (#13006)
- Added support for specifying the text encoding to be used in response filenames
by passing the encoding as a file suffix (e.g. "a.rsp.utf-8" or "a.rsp.cp1252").
If not specified, the encoding is autodetected as either UTF-8 or Python
default "locale.getpreferredencoding()". (#15406, #15292, #15426)
2.0.34 - 11/04/2021
-------------------
- Symbols marked as visibility hidden are no longer exported from C/C++
code when building with `SIDE_MODULE`, `MAIN_MODULE` or `LINKABLE`. If you
need to export a hidden symbol you can still do so by adding it to
EXPORTED_FUNCTIONS.
2.0.33 - 11/01/2021
-------------------
- Bug fixes
2.0.32 - 10/19/2021
-------------------
- Internal-only library functions can now be marked as `__internal: true` in JS
system libraries. Such symbols should not be used by external libraries and
are subject to change. As of now we generate warning when external libraries
depend on the these symbols.
- Stub functions from `library_syscall.js` and `library.js` were replaced with
native code stubs (See `system/lib/libc/emscripten_syscall_stubs.c`). This
should be better for wasm module portability as well as code size. As part
of this change the return value of `popen` was fixed to return NULL rather
than -1 and the `getpwnam` family of functions were changed to return an
error rather than throw a JavaScript exception (this behaviour matches what
the other stub functions do). As before, the `ALLOW_UNIMPLEMENTED_SYSCALLS`
setting controls whether of not these stubs get included at link time, and
`STRICT` disables this setting.
- Emscripten will now warn when linker-only flags are specified in
compile-only (`-c`) mode. Just like with clang itself, this warning can be
disabled using the flag: `-Wno-unused-command-line-argument`.
- Internal symbol names for musl syscalls changed from number-based (e.g.
`__syscall22`) to name-based (e.g. `__syscall_open`). This should not be
a visible change except for folks trying to intercept/implement syscalls
in native code (#15202).
- Fixed launcher batch script issues on Windows, and added two env. vars
EM_WORKAROUND_PYTHON_BUG_34780 and EM_WORKAROUND_WIN7_BAD_ERRORLEVEL_BUG that
can be enabled to work around a Windows Python issue
https://bugs.python.org/issue34780 , and a Windows 7 exit code issue (#15146)
- Support a new CMake propert `EMSCRIPTEN_SYSTEM_PROCESSOR` which can be used
to override the default value of `CMAKE_SYSTEM_PROCESSOR` set by the
toolchain file.
- Remove support for the `EMIT_EMSCRIPTEN_METADATA` setting. This setting has
been deprecated for some time now and we don't know of any remaining reasons to
keep it around.
- Add JavaScript API `Emval.{toHandle, toValue}` as well as a C++ method
`val::as_handle()` to allow passing values between the `val` class and
`EM_JS`/ `EM_ASM` JavaScript snippets. (#15279)
- Added SAFE_HEAP=2 option which tests safe heap behavior for wasm-only builds
(allowing unaligned memory accesses, which would not work in Wasm2JS but in
wasm would be correct but potentially slow).
2.0.31 - 10/01/2021
-------------------
- Bug fixes
2.0.30 - 09/14/2021
-------------------
- Bug fixes
2.0.29 - 08/26/2021
-------------------
- Bug fixes
2.0.28 - 08/23/2021
-------------------
- Added some support for signal handling libc functions (raise, kill,
sigaction, sigpending, etc). We still don't have a way to deliver signals from
the outside but these at least now work for sending signals to the current
thread (JS context) (#14883).
- Remove the workaround used in emcmake and emmake that removed directories
with sh.exe from PATH on Windows when MinGW Makefiles generator was used.
This was needed with CMake versions older than 3.17.0. If you get an error
"sh.exe was found in your PATH" on Windows, you can either update to CMake
3.17.0 or newer, or remove the offending directory from your PATH. See
https://github.com/Kitware/CMake/commit/82ddcf0db1d220564145122c3cce25d25ee0e254
for more information. (#14930)
2.0.27 - 08/12/2021
-------------------
- Added `EM_ASYNC_JS` macro - similar to `EM_JS`, but allows using `await`
inside the JS block and automatically integrates with Asyncify without
the need for listing the declared function in `ASYNCIFY_IMPORTS` (#9709).
- Errors that occur on pthreads (e.g. uncaught exception) will now get re-thrown
on the main thread rather than simply being logged (#13666).
2.0.26 - 07/26/2021
-------------------
- When building ports with the `embuilder` tool some of the names of the
libraries have changed (they now match the filenames in the `tools/ports/`
directory). For example `sdl-image` is now `sdl_image` (#14737).
- Undefined data symbols (in static executables) are no longer silently ignored
at link time. The previous behaviour (which was to silently give all
undefined data symbols address zero, which could lead to bugs)
can be enabled by passing either `-Wl,--allow-undefined` or
`-Wl,--unresolved-symbols=ignore-all`.
- The alignment of `long double`, which is a 128-bit floating-point value
implemented in software, is reduced from 16 to 8. The lower alignment allows
`max_align_t` to properly match the alignment we use for malloc, which is 8
(raising malloc's alignment to achieve correctness the other way would come
with a performance regression). (#10072)
- The `alignMemory` function is now a library function and therefore not
included by default. Debug builds will automatically abort if you try
to use this function without including it. The normal library `__deps`
mechanism can be used to include it, or can be added to
`DEFAULT_LIBRARY_FUNCS_TO_INCLUDE`.
- dlopen can now load libraries at runtime from the web without preloading
or embedding. This features relies on `ASYNCIFY` to suspend execution until
the library is loaded and then continue on as if dlopen was blocking. For
users who don't want to use `ASYNCIFY` (which has a size and runtime cost)
there is a async (callback-based) version of the dlopen API available as
`emscripten_dlopen()` declared in `emscropten/emscripten.h`. See
`docs/api_reference/emscripten.h.rst` (or the online version) for more
details.
- Constructors, functions and methods bound with Embind can now be `await`ed.
When Asyncify is used somewhere in the callstack, previously Embind would
return `0` / `null` / `false` / instance with a NULL pointer, making it
impossible to wait for the function to actually finish and retrieve its
result. Now in those cases it will return a `Promise` instead that will
resolve with the function's return value upon completion. (#11890)
2.0.25 - 06/30/2021
-------------------
- Support for the 'shell' environment is now disabled by default. Running under
`d8`, `js`, or `jsc` is not something that most emscripten users ever want to
do, so including the support code is, more often than not, unnecessary. Users
who want shell support can enable it by including 'shell' in `-s ENVIRONMENT`
(#14535).
- A new setting called `ALLOW_UNIMPLEMENTED_SYSCALLS` was added. This setting
is enabled by default but, if disabled, will generate link-time errors if
a program references an unimplemented syscall. This setting is disabled
by default in `STRICT` mode.
- By default (unless `EXIT_RUNTIME=1` is specified) emscripten programs running
under node will no longer call `process.exit()` on `exit()`. Instead they
will simply unwind the stack and return to the event loop, much like they do
on the web. In many cases the node process will then exit naturally if there
is nothing keeping the event loop going.
Note for users of node + pthreads: Because of the way that threads are
implemented under node multi-threaded programs now require `EXIT_RUNTIME=1`
(or call `emscripten_force_exit`) in order to actually bring down the process.
- Drop support for node versions older than v5.10.0. We now assume the
existence of `Buffer.from` which was added in v5.10.0. If it turns out
there is still a need to support these older node versions we can
add a polyfil under LEGACY_VM_SUPPORT (#14447).
2.0.24 - 06/10/2021
-------------------
- Support `--preload-file` in Node.js. (#11785)
- System libraries are now passed to the linker internally via `-lfoo` rather
than using their full path. This is in line with how gcc and clang pass system
libraries to the linker. This should not effect any builds unless a project a
happens to have, for example, a file called `libc.a` in one of its library
paths. This would have the effect of overriding the system library (as it
would with gcc or clang) (#14342).
- CMake projects (those that either use emcmake or use Emscripten.cmake
directly) are new configured to install (by default) directly into the
emscripten sysroot. This means that running `cmake --install` (or running the
install target, via `make install` for example) will install resources into
the sysroot such that they can later be found and used by `find_path`,
`find_file`, `find_package`, etc. Previously the default was to attempt to
install into the host system (e.g `/usr/local`) which is almost always not
desirable. Folks that were previously using `CMAKE_INSTALL_PREFIX` to build
their own secondary sysroot may be able to simplify their build system by
removing this completely and relying on the new default.
- Reinstated the warning on linker-only `-s` settings passed when not linking
(i.e. when compiling with `-c`). As before this can disabled with
`-Wno-unused-command-line-argument` (#14182).
- Standalone wasm mode no longer does extra binaryen work during link. It used
to remove unneeded imports, in hopes of avoiding nonstandard imports that
could prevent running in WASI VMs, but that has not been needed any more. A
minor side effect you might see from this is a larger wasm size in standalone
mode when not optimizing (but optimized builds are unaffected). (#14338)
- You can now explicitly request that an environment variable remain unset by
setting its value in `ENV` to `undefined`. This is useful for variables, such
as `LANG`, for which Emscripten normally provides a default value.
2.0.23 - 05/26/2021
-------------------
- libcxxabi updated to llvm-12. (#14288)
- libcxx updated to llvm-12. (#14249)
- compiler-rt updated to llvm-12. (#14280)
2.0.22 - 05/25/2021
-------------------
- Fix a crash bug that was present in 2.0.21 with the use of `-g`. See
https://reviews.llvm.org/D102999.
- wasm-ld will now perform string tail merging in debug string sections as well
as regular data sections. This behaviour can be be disabled with `-Wl,-O0`.
This should significantly reduce the size of dwarf debug information in the
wasm binary.
- The experimental SPLIT_MODULE setting now expects the secondary module to be
named `<module>.deferred.wasm` instead of `<module>.wasm.deferred`.
- sendfile.h header removed from musl. (#14248)
2.0.21: 05/18/2021
------------------
- Options such as EXPORTED_FUNCTIONS that can take a response file containing
list of symbols can now use a simple one-symbol-per-line format. This new
format is much simpler and doesn't require commas between symbols, opening
or closing braces, or any kind of escaping for special characters.
- The WebAssembly linker (`wasm-ld`) now performes string tail merging on any
static string data in your program. This has long been part of the native
ELF linker and should not be observable in well-behaved programs. This
behavior can be disabled by passing `-Wl,-O0`.
- The functions `fork`, `vfork`, `posix_spawn` and `system` now fail with
the errno value `ENOSYS` (52) rather than `EAGAIN` (6). This is more
correct, since they will never work and attempting to retry won't help.
- `EXPORT_ES6` will now emit static URLs for main WebAssembly file as well
as for helper Worker used by `-pthread` that can be statically detected
by modern bundlers at build time. In particular, you no longer have to set
`Module.locateFile` hook and `Module.mainScriptUrlOrBlob` settings -
both bundlers and browsers should pick up the required files automatically.
Note: this doesn't yet cover other use-cases that emit external files,
such as dynamic linking, `--proxy-to-worker`, external memory etc. (#14135)
- `EXPORT_ES6` can now be used in combination with `-o [filename].html`. (#14165)
- `EXPORT_ES6` no longer requires setting custom `EXPORT_NAME` too. (#14139)
- New diagnostics allow Emscripten to issue warnings when using Intel SIMD
intrinsics (from xmmintrin.h) which have slow emulations rather than fast
WebAssembly equivalents. To enable them, define WASM_SIMD_COMPAT_SLOW
in the preprocessor (#14152)
2.0.20: 05/04/2021
------------------
- This ChangeLog and the `emscripten-version.txt` file that is checked into
the repository now reflect the next, upcoming, release once a release is
made. Previously they would continue to reflect the old release until after
we decide to cut the release. Switching to this method allow for a slightly
simpler release process that also allows us to tag a version that contains
the correct version information.
- The version string reported by `-v`/`--version` now includes a `-git` suffix
(e.g. `2.0.19-git`) when running from git checkout (to help distinguish
unreleased git versions from official releases) (#14092).
- Temporarily back out new `-Wunused-command-line-argument` warnings introduced
in 2.0.19.
2.0.19: 05/04/2021
------------------
- Emscripten will now warn when linker-only `-s` settings are specified in
compile-only (`-c`) mode. Just like with clang itself, this warning can be
disabled using the flag: `-Wno-unused-command-line-argument`.
- When building with `-s MAIN_MODULE` emscripten will now error on undefined
symbol by default. This matches the behvious of clang/gcc/msvc. This
requires that your side modules be present on the command line. If you do not
specify your side modules on the command line (either direcly or via
`RUNTIME_LINKED_LIBS`) you may need to add `-s WARN_ON_UNDEFINED_SYMBOLS=0` to
avoid errors about symbol that are missing at link time (but present in your
side modules provided at runtime). We hope that this case is not common and
most users are building with side modules listed on the command line (#14060).
- The `RUNTIME_LINKED_LIBS` setting is now deprecated. It's better to simply
list dynamic library dependencies directly on the command line.
2.0.18: 04/23/2021
------------------
- The `makeBigInt` function was removed from the emscripten runtime since it
had no internal users.
- Restored support for --cache command line flag to configure location of the
Emscripten cache root directory.
- `EXTRA_EXPORTED_RUNTIME_METHODS` is deprecated in favor of just using
`EXPORTED_RUNTIME_METHODS`.
- When building with `MAIN_MODULE=2` the linker will now automatically include
any symbols required by side modules found on the command line. This means
that for many users of `MAIN_MODULE=2` it should no longer be necessary to
list explicit `EXPORTED_FUNCTIONS`. Also, users of `MAIN_MODULE=1` with
dynamic linking (not dlopen) who list all side modules on the command line,
should be able to switch to `MAIN_MODULE=2` and get a reduction in code size.
- When building with `MAIN_MODULE` it is now possbile to warn or error on
undefined symbols assuming all the side modules are passed at link time. This
means that for many projects it should now be possbile to enable
`ERROR_ON_UNDEFINED_SYMBOLS` along with `MAIN_MODULE`.
2.0.17: 04/10/2021
------------------
- Use of closure compiler (`--closure`) is now supported when using dynamic
linking (building with `-s MAIN_MODULE`) (#13880)
- Specifying `EM_CONFIG` inline (python code in the environment variable itself)
is no longer supported (#13855). This has been long deprecated but finally
completely removed.
- Deprecate `-g4`, which is a little confusing as it does not do more than `-g3`
but instead emits source maps instead of DWARF. `-g4` will now warn. A new
flag `-gsource-map` enables source maps without warning.
- In order to behave more like clang and gcc, emscripten no longer
supports some nonstandard methods of library lookup (that worked
unintentionally and were untested and not documented):
1. Linking with `-llibc` rather than `-lc` will no longer work.
2. Linking a library called `foo.a` via `-lfoo` will no longer work.
(libraries found via `-l` have to start with `lib`)
- Use LLVM's new pass manager by default, as LLVM does. This changes a bunch of
things about how LLVM optimizes and inlines, so it may cause noticeable
changes in compile times, code size, and speed, either for better or for
worse. You can use the old pass manager (until LLVM removes it) by passing
`-flegacy-pass-manager` (and `-Wl,--lto-legacy-pass-manager` when doing LTO)
(note however that neither workaround affects the building of system
libraries, unless you modify emscripten or build them manually). (#13427)
- Removed use of Python multiprocessing library because of stability issues.
Added a new environment variable `EM_PYTHON_MULTIPROCESSING=1` that can be set
to revert back to using Python multiprocessing, in case there are reports of
regressions (that variable is intended to be temporary). (#13493)
- Binaryen now always inlines single-use functions. This should reduce code size
and improve performance. If you prefer the old default, you can get that with
`-sBINARYEN_EXTRA_PASSES=--one-caller-inline-max-function-size=1` (#13744).
- Fix generating of symbol files with `--emit-symbol-map` for JS targets.
When `-s WASM=2` is used. Two symbols are generated:
- `[name].js.symbols` - storing Wasm mapping
- `[name].wasm.js.symbols` - storing JS mapping
In other cases a single `[name].js.symbols` file is created.
2.0.16: 03/25/2021
------------------
- Lists that are passed on the command line can now skip the opening an closing
braces, allowing for simpler, more readable settings. e.g.
`-s EXPORTED_FUNCTIONS=foo,bar`
- Remove/deprecate no longer used `--llvm-opts` command line option. Any
arguments not processed by emcc will be passed through to clang directly
these days.
- Values returned from `sysconf` now more closely match the definitions found in
header files and in upstream musl (#13713).
- `DISABLE_EXCEPTION_CATCHING=2` is now deprecated since it can be inferred from
the presence of the `EXCEPTION_CATCHING_ALLOWED` list. This makes
`DISABLE_EXCEPTION_CATCHING` a simple binary option (0 or 1) which defaults to
0 which will be set to 1 internally if `EXCEPTION_CATCHING_ALLOWED` list is
specified.
- Values returned from `pathconf` now match the definitions found in header files
and/or upstream musl:
_PC_LINK_MAX 3200 -> 8
_PC_SYNC_IO -1 -> 1
_PC_REC_INCR_XFER_SIZE -1 -> 4096
_PC_REC_MAX_XFER_SIZE -1 -> 4096
_PC_SYMLINK_MAX -1 -> 255
- Added support for wrapping emcc and em++ via ccache: install Emscripten port
of ccache via emsdk, or from https://github.com/juj/ccache/tree/emscripten,
and run explicitly with "ccache emcc ..." after installing, or automatically
just with "emcc ..." after activating ccache via emsdk (#13498).
- Added support to use a custom set of substitution characters . # and ? to
ease passing arrays of C symbols on the command line to ASYNCIFY_* settings.
(#13477)
- In MINIMAL_RUNTIME build mode, errno support will now be disabled by default
due to the code size that it adds. (MINIMAL_RUNTIME=1 implies SUPPORT_ERRNO=0
by default) Pass -s SUPPORT_ERRNO=1 to enable errno support if necessary.
- Using EM_ASM and EM_JS in a side module will now result in an error (since
this is not implemented yet). This could effect users were previously
inadvertently including (but not actually using) EM_ASM or EM_JS functions in
side modules (#13649).
- Remove dependency on Uglify by finishing the rewrite of passes to acorn
(#13636, #13621).
- Primary development branch switched from `master` to `main`.
2.0.15: 03/05/2021
------------------
- Calls to `newlocale` (and `new std::locale` in C++) with arbirary names will
now succeed. This is the behaviour of musl libc which emscripten had
previously inadvertently disabled.
- System libraries are now compiled with debug info (`-g`). This doesn't
affect release builds (builds without `-g`) but allows DWARF debugging of
types defined in system libraries such as C++ STL types (#13078).
- uname machine field is now either wasm32 or wasm64 instead of x86-JS (#13440)
- Several pthreads exit-related fixes (#12985) (#10524).
- Fix IDBFS syncing with existing directories (#13574).
- Add libmodplug port and allow mod files to be played in SDL2 (#13478).
- `emscripten_GetProcAddress` is now part of `libGL`. Normally the change is not
noticeable, unless you build in `STRICT` mode and do not already have `-lGL`
to link in that library. If not, add `-lGL`. (#13524)
2.0.14: 02/14/2021
------------------
- Add new setting: `REVERSE_DEPS`. This can be used to control how emscripten
decides which reverse dependecies to include. See `settings.js` for more
information. The default setting ('auto') is the traditional way emscripten
has worked in the past so there should be no change unless this options is
actually used. This option partially replaces the `EMCC_ONLY_FORCED_STDLIBS`
environment variable which (among other things) essentially had the effect of
setting `REVERSE_DEPS` to be 'all'.
- Clang now performs loop unrolling when targeting WebAssembly at -O2 and
higher. It can be disabled using `-fno-unroll-loops`.
2.0.13: 01/19/2021
------------------
- Remove unused `Browser.safeSetInterval` and `Browser.safeCallback`. These
had no callers in emscripten itself or any testing. If there are users of
these functions we could re-enable them with some testing.
- Fix race condition when running many emcc processes after clearing the cache.
The processes would race to run the sanity checks and could interfere with
each other (#13299).
- Emscripten now builds a complete sysroot inside the EM_CACHE directory.
This includes the system headers which get copied into place there rather
than adding a sequence of extra include directories.
- Added support for -s MALLOC=emmalloc when -s MAXIMUM_MEMORY is more than 2GB.
(#13258)
- Add back support for calling the legacy dynCall_sig() API to invoke function
pointers to wasm functions from JavaScript. Pass -s DYNCALLS=1
to include that functionality in the build. This fixes a regression that
started in Aug 31st 2020 (Emscripten 2.0.2) in #12059. Also implement
support for dynCall() in MINIMAL_RUNTIME builds. (#13296)
- `SDL2_ttf` now uses upstream compiled with `TTF_USE_HARFBUZ` flag.
- The system for linking native libraries on demand (based on the symbols
present in input object files) has been removed. Libraries such as libgl,
libal, and libhtml5 are now included on the link line by default unless
`-s AUTO_NATIVE_LIBRARIES=0` is used. This should not effect most builds
in any way since wasm-ld ignores unreferenced library files. Only users
of the `--whole-archive` linker flag (which is used when `MAIN_MODULE=1` is
set) should be effected.
2.0.12: 01/09/2021
------------------
- `emscripten/vr.h` and other remnants of WebVR support removed. (#13210, which
is a followup to #10460)
- Stop overriding CMake default flags based on build type. This will
result in builds that are more like CMake does on other platforms. You
may notice that `RelWithDebInfo` will now include debug info (it did not
before, which appears to have been an error), and that `Release` will
use `-O3` instead of `-O2` (which is a better choice anyhow). (#13083)
2.0.11: 12/17/2020
------------------
- `emcc -v` no longer forces the running the sanity checks. Sanity checks
are always run on first use or can be forced with `--check` or by setting
`EMCC_DEBUG` is set in the environment.
- An upstream LLVM regression with global initializer linking has been fixed
(#13038).
- Remove a racy unneeded assertion about async dynamic linking (#13060).
2.0.10: 12/04/2020
------------------
- Fix handling of exit() in pthreads. (#12933)
- Added support for C11 thread API. (#9243)
- The WebAssembly memory used by emscripten programs is now, by default, created
in the wasm file and exported to JavaScript. Previously we could create the
memory in JavaScript and import it into the wasm file. The new
`IMPORTED_MEMORY` setting can be used to revert to the old behaviour.
Breaking change: This new setting is required if you provide a runtime
value for `wasmMemory` or `INITIAL_MEMORY` on the Module object.
- Internally, emscripten now uses the `--sysroot` argument to point clang at
it headers. This should not effect most projects but has a minor effect the
order of the system include paths: The root include path
(`<emscritpen_root>/system/include`) is now always last in the include path.
- Fix JS pthreads proxying + WASM_BIGINT (#12935)
- Optimize makeDynCall to use dynCall_xx function directly where needed (#12741)
2.0.9: 11/16/2020
-----------------
- dlopen, in conformace with the spec, now checks that one of either RTDL_LAZY
or RTDL_NOW flags ar set. Previously, it was possible set nether of these
without generating an error.
- Allow `-lSDL2_mixer` to just work. (Others like `-lSDL2` always worked, but
for `SDL2_mixer` things were broken because we build multiple variations of
that library.) That link flag is now the same as `-s USE_SDL2_MIXER=2`.
- Stack state is no longer stored in JavaScript. The following variables have
been replaced with native functions in `<emscripten/stack.h>`:
- STACK_BASE
- STACK_MAX
- STACKTOP
- TOTAL_STACK
- The ABI used for importing symbol by address in dynamic linking (MAIN_MODULE +
SIDE_MODULE) is now the same as the ABI used by llvm and wasm-ld. That is,
symbol addresses are imported from the 'GOT.mem' and 'GOT.func' pseudo
modules. As one side effect of this change it is now required that JavaScript
functions that are imported by address are now required to have a `__sig`
specified in the library JavaScript file.
- `MODULARIZE` + `WASM_ASYNC_COMPILATION=0`, that is, modularize mode but with
async compilation turned off, so that startup is synchronous, now returns the
Module object from the factory function (as it would not make sense to return
a Promise without async startup). See #12647
- Added experimental support for using emscripten as a post link tool. In this
case the input to emscripten is a single wasm file (for example the output of
`wasm-ld`). When emcc is run with `--post-link` it will take a wasm file as
input that perform all the normal post link steps such as finalizing and
optimizing the wasm file and generating the JavaScript and/or html that will
run it.
- Added emulation support and a build time warning for calling Wasm function
pointers from JS library files via the old syntax
{{{ makeDynCall('sig') }}} (ptr, arg1, arg2);
that was broken on Aug 31st 2020 (Emscripten 2.0.2). A build warning will now
be emitted if the old signature is used. Convert to using the new signature
{{{ makeDynCall('sig', 'ptr') }}} (arg1, arg2);
instead.
2.0.8: 10/24/2020
-----------------
- `-s ASSERTIONS=2` now implies `-s STACK_OVERFLOW_CHECK=2`. Previously only
`-s ASSERTIONS=1` implied `-s STACK_OVERFLOW_CHECK=1`.
- Dynamic linking (MAIN_MODULE + SIDE_MODULE) now produces wasm binaries that
depend on mutable globals. Specifically the stack pointer global is mutable
and shared between the modules. This is an ABI change for dynamic linking.
(#12536)
- emcc now accepts `--arg=foo` as well as `--arg foo`. For example
`--js-library=file.js`.
- Reject promises returned from the factory function created by using the
MODULARIZE build option if initialization of the module instance fails
(#12396).
- emrun: Passing command line flags (arguments that start with `-`) to the
program bring run now requires a `--` on the command line to signal the
end of `emrun` arguments. e.g:
`emrun filename.html -- --arg-for-page`
This is standard behaviour for command line parsing and simplifies the
emrun logic.
2.0.7: 10/13/2020
-----------------
- Don't run Binaryen postprocessing for Emscripten EH/SjLj. This lets us avoid
running `wasm-emscripten-finalize` just for C++ exceptions or longjmp. This
is an ABI change. (#12399)
- Run `SAFE_HEAP` on user JS code using a new Acorn pass, increasing the
coverage of those tests to all JS in the output (#12450).
- `EM_LOG_DEMANGLE` is now deprecated. Function names shown in wasm backtraces
are never mangled (they are either missing or demangled already) so demangled
is not possible anymore.
- In STRICT mode we no longer link in C++ mode by default. This means if you
are building a C++ program in STRICT mode you need to link via `em++` rather
than `emcc`. This matches the behaviour of gcc and clang.
- IDBFS now persists files whenever their timestamp changes; previously it acted
on sync only if the timestamp increased and ignored the file changes otherwise.
- When `-s SUPPORT_LONGJMP=0` is passed to disable longjmp, do not run the LLVM
wasm backend path that handles longjmp. Before this only affected linking, and
now the flag gives you the ability to affect codegen at compile time too. This
is necessary if one does not want any invokes generated for longjmp at all.
(#12394)
2.0.6: 10/02/2020
-----------------
- Add new `COMPILER_WRAPPER` settings (with corresponding `EM_COMPILER_WRAPPER`
environment variable. This replaces the existing `EMMAKEN_COMPILER`
environment variable which is deprecated, but still works for the time being.
The main differences is that `EM_COMPILER_WRAPPER` only wrapps the configured
version of clang rather than replacing it.
- ASAN_SHADOW_SIZE is deprecated. When using AddressSanitizer, the correct
amount of shadow memory will now be calculated automatically.
2.0.5: 09/28/2020
-----------------
- Fix a rare pthreads + exceptions/longjmp race condition (#12056).
- Add `WEBGL_multi_draw_instanced_base_vertex_base_instance` bindings (#12282).
- Fix a rare pthreads main thread deadlock (that worsened in 2.0.2, but existed
before). (#12318)
- The WebAssembly table is now created and exported by the generated wasm
module rather then constructed by the JS glue code. This is an implemention
detail that should not affect most users, but reduces code size. (#12296)
- Add `getentropy` in `sys/random.h`, and use that from libc++'s
`random_device`. This is more efficient, see #12240.
- Fixed `ABORT_ON_WASM_EXCEPTIONS` to work with the recent dynCall changes where
functions can be called via the WASM table directly, bypassing WASM exports
(#12269).
- Add `ASYNCIFY_ADVISE` to output which functions have been instrumented for
Asyncify mode, and why they need to be handled. (#12146)
2.0.4: 09/16/2020
-----------------
- First release with Bazel support.
- Stop including `malloc` and `free` by default. If you need access to them from
JS, you must export them manually using
`-s EXPORTED_FUNCTIONS=['_malloc', ..]`.
- Stop running Binaryen optimizations in `-O1`. This makes `-O1` builds a little
larger but they compile a lot faster, which makes more sense in a "compromise"
build (in between `-O0` and higher optimization levels suitable for release
builds). (#12178)
- Add `ERROR_ON_WASM_CHANGES_AFTER_LINK` option that errors if we need to do
any work in `wasm-emscripten-finalize` or `wasm-opt` after linking. This
can verify the link is maximally fast and also does no DWARF rewriting.
(#12173)
2.0.3: 09/10/2020
-----------------
- Breaking changes to calling Wasm function pointers from JavaScript:
1. It is no longer possible to directly call dynCall_sig(funcPtr, param) to
call a function pointer from JavaScript code. As a result, JavaScript code
outside all JS libraries (pre-js/post-js/EM_ASM/EM_JS/external JS code) can no
longer call a function pointer via static signature matching dynCall_sig, but
must instead use the dynamic binding function
dynCall(sig, ptr, args);
This carries a significant performance overhead. The function dynCall is not
available in -s MINIMAL_RUNTIME=1 builds.
2. old syntax for calling a Wasm function pointer from a JS library file used
to be
{{{ makeDynCall('sig') }}} (ptr, arg1, arg2);