Skip to content

Commit 0f4c511

Browse files
committed
Bump safari from 14.0 to 14.1 for even more wins!
For example, we can completely remove the sign extension lowering pass now.
1 parent a122625 commit 0f4c511

11 files changed

Lines changed: 54 additions & 83 deletions

ChangeLog.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,18 @@ See docs/process.md for more on how version tagging works.
4747
`-sMEMORY64` and/or `--target=wasm64`. (#26765)
4848
- The filesystem opteration that create new files now honor the global umask,
4949
which defaults for 0o222 and can be updated by calling `umask()`. (#50739)
50-
51-
5.0.6 - 04/14/26
52-
----------------
5350
- The minimum versions of browser engines supported by emscirpten generated
5451
code was bumped, allowing us to remove our internal support for transpilation
5552
via babel:
5653
MIN_CHROME_VERSION: 74 -> 85
5754
MIN_FIREFOX_VERSION: 68 -> 79
58-
MIN_SAFARI_VERSION: 12.2 -> 14.0
55+
MIN_SAFARI_VERSION: 12.2 -> 14.1
56+
This allows us to assume that features such as mutable-globals, and sign-ext,
57+
and threading, are univerally available and disabling these is not longer
58+
possible.
59+
60+
5.0.6 - 04/14/26
61+
----------------
5962
- The minimum version of node supported by the generated code was bumped from
6063
v12.22.0 to v18.3.0. (#26604)
6164
- The DETERMINISTIC settings was marked as deprecated (#26653)

src/settings.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1892,7 +1892,7 @@ var MIN_FIREFOX_VERSION = 79;
18921892
// Multithreaded Emscripten code will need Safari 12.2 (iPhone 5s+) at minimum,
18931893
// with support for DedicatedWorkerGlobalScope.name parameter.
18941894
// MAX_INT (0x7FFFFFFF, or -1) specifies that target is not supported.
1895-
// Minimum supported value is 140000 which was released on 2020-09-16 (see
1895+
// Minimum supported value is 140100 which was released on 2021-04-26 (see
18961896
// feature_matrix.py).
18971897
// [link]
18981898
var MIN_SAFARI_VERSION = 150000;

test/codesize/test_codesize_hello_dylink_all.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"a.out.js": 244573,
3-
"a.out.nodebug.wasm": 578045,
4-
"total": 822618,
3+
"a.out.nodebug.wasm": 578052,
4+
"total": 822625,
55
"sent": [
66
"IMG_Init",
77
"IMG_Load",

test/other/test_signext_lowering.c

Lines changed: 0 additions & 6 deletions
This file was deleted.

test/test_browser.py

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -256,10 +256,6 @@ def es6_module_workers_disabled():
256256
requires_offscreen_canvas = skipIfFeatureNotAvailable('EMTEST_LACKS_OFFSCREEN_CANVAS', Feature.OFFSCREENCANVAS_SUPPORT, 'This test requires a browser with OffscreenCanvas')
257257
requires_es6_workers = skipIfFeatureNotAvailable('EMTEST_LACKS_ES6_WORKERS', Feature.WORKER_ES6_MODULES, 'This test requires a browser with ES6 Module Workers support')
258258
requires_growable_arraybuffers = skipIfFeatureNotAvailable('EMTEST_LACKS_GROWABLE_ARRAYBUFFERS', Feature.GROWABLE_ARRAYBUFFERS, 'This test requires a browser that supports growable ArrayBuffers')
259-
# N.b. not all SharedArrayBuffer requiring tests are annotated with this decorator, since at this point there are so many of such tests.
260-
# As a middle ground, if a test has a name 'thread' or 'wasm_worker' in it, then it does not need decorating. To run all single-threaded tests in
261-
# the suite, one can run "EMTEST_LACKS_SHARED_ARRAY_BUFFER=1 test/runner browser skip:browser.test_*thread* skip:browser.test_*wasm_worker* skip:browser.test_*audio_worklet*"
262-
requires_shared_array_buffer = skipIfFeatureNotAvailable('EMTEST_LACKS_SHARED_ARRAY_BUFFER', Feature.THREADS, 'This test requires a browser with SharedArrayBuffer support')
263259

264260

265261
class browser(BrowserCore):
@@ -2538,7 +2534,7 @@ def test_doublestart_bug(self):
25382534
'closure': (['-O2', '-g1', '--closure=1', '-sHTML5_SUPPORT_DEFERRING_USER_SENSITIVE_REQUESTS=0'],),
25392535
'pthread': (['-pthread'],),
25402536
'proxy_to_pthread': (['-pthread', '-sPROXY_TO_PTHREAD'],),
2541-
'legacy': (['-sMIN_FIREFOX_VERSION=0', '-sMIN_SAFARI_VERSION=0', '-sMIN_CHROME_VERSION=0', '-Wno-transpile'],),
2537+
'legacy': (['-sMIN_FIREFOX_VERSION=0', '-sMIN_SAFARI_VERSION=0', '-sMIN_CHROME_VERSION=0'],),
25422538
})
25432539
def test_html5_core(self, opts):
25442540
if self.is_wasm64() and '-sMIN_CHROME_VERSION=0' in opts:
@@ -2641,7 +2637,7 @@ def test_webgl_unmasked_vendor_webgl(self):
26412637

26422638
@requires_graphics_hardware
26432639
@parameterized({
2644-
'legacy_browser': (['-sMIN_CHROME_VERSION=0', '-Wno-transpile'],),
2640+
'legacy_browser': (['-sMIN_CHROME_VERSION=0'],),
26452641
'closure': (['-O2', '-g1', '--closure=1'],),
26462642
'full_es2': (['-sFULL_ES2'],),
26472643
})
@@ -3489,7 +3485,6 @@ def test_dlopen_async(self):
34893485
self.emcc('side.c', ['-o', 'libside.so', '-sSIDE_MODULE'])
34903486
self.btest_exit('other/test_dlopen_async.c', cflags=['-sMAIN_MODULE=2'])
34913487

3492-
@requires_shared_array_buffer
34933488
def test_dlopen_blocking(self):
34943489
self.emcc('other/test_dlopen_blocking_side.c', ['-o', 'libside.so', '-sSIDE_MODULE', '-pthread', '-Wno-experimental'])
34953490
# Attempt to use dlopen the side module (without preloading) should fail on the main thread
@@ -4540,7 +4535,6 @@ def test_fetch_to_memory_async(self):
45404535
create_file('myfile.dat', 'hello world\n' * 1000)
45414536
self.btest_exit('fetch/test_fetch_to_memory_async.c', cflags=['-sFETCH'])
45424537

4543-
@requires_shared_array_buffer
45444538
def test_fetch_to_memory_sync(self):
45454539
create_file('myfile.dat', 'hello world\n' * 1000)
45464540
self.btest_exit('fetch/test_fetch_to_memory_sync.c', cflags=['-sFETCH', '-pthread', '-sPROXY_TO_PTHREAD'])
@@ -4873,11 +4867,9 @@ def test_emscripten_request_animation_frame_loop(self):
48734867
def test_request_animation_frame(self):
48744868
self.btest_exit('test_request_animation_frame.c')
48754869

4876-
@requires_shared_array_buffer
48774870
def test_emscripten_set_timeout(self):
48784871
self.btest_exit('emscripten_set_timeout.c', cflags=['-pthread', '-sPROXY_TO_PTHREAD'])
48794872

4880-
@requires_shared_array_buffer
48814873
def test_emscripten_set_timeout_loop(self):
48824874
self.btest_exit('emscripten_set_timeout_loop.c', cflags=['-pthread', '-sPROXY_TO_PTHREAD'])
48834875

@@ -4887,7 +4879,6 @@ def test_emscripten_set_immediate(self):
48874879
def test_emscripten_set_immediate_loop(self):
48884880
self.btest_exit('emscripten_set_immediate_loop.c')
48894881

4890-
@requires_shared_array_buffer
48914882
def test_emscripten_set_interval(self):
48924883
self.btest_exit('emscripten_set_interval.c', cflags=['-pthread', '-sPROXY_TO_PTHREAD'])
48934884

@@ -5466,15 +5457,13 @@ def test_full_js_library_strict(self):
54665457
'audio_params_disabled': (['-sAUDIO_WORKLET_SUPPORT_AUDIO_PARAMS=0'],),
54675458
})
54685459
@requires_sound_hardware
5469-
@requires_shared_array_buffer
54705460
def test_audio_worklet(self, args):
54715461
if '-sEXPORT_ES6' in args and es6_module_workers_disabled():
54725462
self.skipTest('This test requires a browser with ES6 Module Workers support')
54735463
self.btest_exit('webaudio/audioworklet.c', cflags=['-sAUDIO_WORKLET', '-sWASM_WORKERS', '-DTEST_AND_EXIT'] + args)
54745464

54755465
# Tests that audioworklets and workers can be used at the same time
54765466
# Note: doesn't need audio hardware (and has no AW code that tests 2GB or wasm64)
5477-
@requires_shared_array_buffer
54785467
def test_audio_worklet_worker(self):
54795468
self.btest_exit('webaudio/audioworklet_worker.c', cflags=['-sAUDIO_WORKLET', '-sWASM_WORKERS'])
54805469

@@ -5484,7 +5473,6 @@ def test_audio_worklet_worker(self):
54845473
'closure': (['--closure', '1', '-Oz'],),
54855474
})
54865475
# Note: doesn't need audio hardware (and has no AW code that tests 2GB or wasm64)
5487-
@requires_shared_array_buffer
54885476
def test_audio_worklet_post_function(self, args):
54895477
self.btest_exit('webaudio/audioworklet_post_function.c', cflags=['-sAUDIO_WORKLET', '-sWASM_WORKERS'] + args)
54905478

@@ -5493,7 +5481,6 @@ def test_audio_worklet_post_function(self, args):
54935481
'closure': (['--closure', '1', '-Oz'],),
54945482
})
54955483
@requires_sound_hardware
5496-
@requires_shared_array_buffer
54975484
def test_audio_worklet_modularize(self, args):
54985485
self.btest_exit('webaudio/audioworklet.c', cflags=['-sAUDIO_WORKLET', '-sWASM_WORKERS', '-sMODULARIZE=1', '-DTEST_AND_EXIT'] + args)
54995486

@@ -5505,7 +5492,6 @@ def test_audio_worklet_modularize(self, args):
55055492
'minimal_with_closure': (['-sMINIMAL_RUNTIME', '--closure=1', '-Oz'],),
55065493
})
55075494
@requires_sound_hardware
5508-
@requires_shared_array_buffer
55095495
def test_audio_worklet_params_mixing(self, args):
55105496
os.mkdir('audio_files')
55115497
copy_asset('webaudio/audio_files/emscripten-beat.mp3', 'audio_files/')
@@ -5514,7 +5500,6 @@ def test_audio_worklet_params_mixing(self, args):
55145500

55155501
# Tests AudioWorklet with emscripten_lock_busyspin_wait_acquire() and friends
55165502
@requires_sound_hardware
5517-
@requires_shared_array_buffer
55185503
@also_with_minimal_runtime
55195504
def test_audio_worklet_emscripten_locks(self):
55205505
self.btest_exit('webaudio/audioworklet_emscripten_locks.c', cflags=['-sAUDIO_WORKLET', '-sWASM_WORKERS', '-pthread'])
@@ -5626,7 +5611,6 @@ def test_rollup(self):
56265611
'': ([], 9998),
56275612
'es6': (['-sEXPORT_ES6', '--extern-post-js', test_file('modularize_post_js.js')], 9999),
56285613
})
5629-
@requires_shared_array_buffer
56305614
def test_cross_origin(self, args, port):
56315615
if '-sEXPORT_ES6' in args and browser_should_skip_feature('EMTEST_LACKS_ES6_WORKERS', Feature.WORKER_ES6_MODULES):
56325616
self.skipTest('This test requires a browser with ES6 Module Workers support')

test/test_other.py

Lines changed: 8 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -10073,20 +10073,18 @@ def compile(flags):
1007310073
verify_features_sec('sign-ext', False)
1007410074

1007510075
# Disable via browser selection
10076-
compile(['-sMIN_SAFARI_VERSION=140000'])
10077-
verify_features_sec_linked('sign-ext', False)
1007810076
compile(['-sMIN_SAFARI_VERSION=140100'])
1007910077
verify_features_sec_linked('bulk-memory-opt', False)
1008010078
verify_features_sec_linked('nontrapping-fptoint', False)
1008110079
# Flag disabling overrides default browser versions
10082-
compile(['-mno-sign-ext'])
10083-
verify_features_sec_linked('sign-ext', False)
10080+
compile(['-mno-bulk-memory'])
10081+
verify_features_sec_linked('bulk-memory', False)
1008410082
# Flag disabling overrides explicit browser version
10085-
compile(['-sMIN_SAFARI_VERSION=160000', '-mno-sign-ext'])
10086-
verify_features_sec_linked('sign-ext', False)
10083+
compile(['-sMIN_SAFARI_VERSION=160000', '-mno-bulk-memory'])
10084+
verify_features_sec_linked('bulk-memory', False)
1008710085
# Flag enabling overrides explicit browser version
10088-
compile(['-sMIN_SAFARI_VERSION=140000', '-msign-ext'])
10089-
verify_features_sec_linked('sign-ext', True)
10086+
compile(['-sMIN_SAFARI_VERSION=140100', '-mnontrapping-fptoint'])
10087+
verify_features_sec_linked('nontrapping-fptoint', True)
1009010088
# Flag disabling overrides explicit version for bulk memory
1009110089
compile(['-sMIN_SAFARI_VERSION=150000', '-mno-bulk-memory'])
1009210090
verify_features_sec_linked('bulk-memory-opt', False)
@@ -13842,8 +13840,8 @@ def test_reproduce(self):
1384213840
self.assertTextDataIdentical(expected, response)
1384313841

1384413842
def test_min_browser_version(self):
13845-
expected = 'emcc: error: MIN_SAFARI_VERSION=140000 is not compatible with WASM_BIGINT (MIN_SAFARI_VERSION=150000 or above required)'
13846-
self.assert_fail([EMCC, test_file('hello_world.c'), '-Wno-transpile', '-Werror', '-sWASM_BIGINT', '-sMIN_SAFARI_VERSION=140000'], expected)
13843+
expected = 'emcc: error: MIN_SAFARI_VERSION=140100 is not compatible with WASM_BIGINT (MIN_SAFARI_VERSION=150000 or above required)'
13844+
self.assert_fail([EMCC, test_file('hello_world.c'), '-Werror', '-sWASM_BIGINT', '-sMIN_SAFARI_VERSION=140100'], expected)
1384713845

1384813846
# Test that using two different ways to disable a target environment at the same time will not produce a warning.
1384913847
def test_double_disable_environment(self):
@@ -13861,18 +13859,6 @@ def test_only_target_node_pthreads(self):
1386113859
self.assertContained('This page was compiled without support for Firefox browser', content)
1386213860
self.assertContained('This page was compiled without support for Chrome browser', content)
1386313861

13864-
def test_signext_lowering(self):
13865-
# Use `-v` to show the sub-commands being run by emcc.
13866-
cmd = [EMCC, test_file('other/test_signext_lowering.c'), '-v']
13867-
13868-
# By default we don't expect the lowering pass to be run.
13869-
err = self.run_process(cmd, stderr=subprocess.PIPE).stderr
13870-
self.assertNotContained('--signext-lowering', err)
13871-
13872-
# Specifying an older browser version should trigger the lowering pass
13873-
err = self.run_process(cmd + ['-sMIN_SAFARI_VERSION=140000'], stderr=subprocess.PIPE).stderr
13874-
self.assertContained('--signext-lowering', err)
13875-
1387613862
@flaky('https://github.com/emscripten-core/emscripten/issues/20125')
1387713863
def test_itimer(self):
1387813864
self.do_other_test('test_itimer.c')

test/test_posixtest.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,9 @@
1616
import unittest
1717

1818
import test_posixtest_browser
19-
from browser_common import browser_should_skip_feature
2019
from common import RunnerCore, path_from_root
2120
from decorators import requires_pthreads
2221

23-
from tools.feature_matrix import Feature
24-
2522
testsuite_root = path_from_root('test/third_party/posixtestsuite')
2623

2724

@@ -172,8 +169,6 @@ def make_test(name, testfile, browser):
172169
def f(self):
173170
if not NORETURN_ONLY and name in disabled:
174171
self.skipTest(disabled[name])
175-
if browser and browser_should_skip_feature('EMTEST_LACKS_SHARED_ARRAY_BUFFER', Feature.THREADS):
176-
self.skipTest('This test requires a browser with SharedArrayBuffer support')
177172

178173
args = ['-I' + os.path.join(testsuite_root, 'include'),
179174
'-Werror',

test/test_sockets.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
requires_native_clang,
2727
test_file,
2828
)
29-
from test_browser import requires_shared_array_buffer
3029

3130
from tools import config
3231
from tools.shared import CLANG_CC, EMCC
@@ -400,7 +399,6 @@ def test_websocket_new(self):
400399

401400
# Test that native POSIX sockets API can be used by proxying calls to an intermediate WebSockets
402401
# -> POSIX sockets bridge server
403-
@requires_shared_array_buffer
404402
def test_posix_proxy_sockets(self):
405403
# Build the websocket bridge server
406404
self.run_process(['cmake', path_from_root('tools/websocket_to_posix_proxy')])

tools/cmdline.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -521,12 +521,6 @@ def consume_arg_file():
521521
override=True)
522522
elif arg == '-mno-bulk-memory':
523523
feature_matrix.disable_feature(feature_matrix.Feature.BULK_MEMORY)
524-
elif arg == '-msign-ext':
525-
feature_matrix.enable_feature(feature_matrix.Feature.SIGN_EXT,
526-
'-msign-ext',
527-
override=True)
528-
elif arg == '-mno-sign-ext':
529-
feature_matrix.disable_feature(feature_matrix.Feature.SIGN_EXT)
530524
elif arg == '-mnontrapping-fptoint':
531525
feature_matrix.enable_feature(feature_matrix.Feature.NON_TRAPPING_FPTOINT,
532526
'-mnontrapping-fptoint',

tools/feature_matrix.py

Lines changed: 34 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,16 @@
1919
# MIN_x_VERSION fields to match accordingly.
2020
OLDEST_SUPPORTED_CHROME = 85 # Released on 2020-08-25
2121
OLDEST_SUPPORTED_FIREFOX = 79 # Released on 2020-07-28
22-
OLDEST_SUPPORTED_SAFARI = 140000 # Released on 2020-09-16
22+
OLDEST_SUPPORTED_SAFARI = 140100 # Released on 2021-04-26
2323
# This is the oldest version of node that we do any testing with.
2424
# Keep this in sync with the test-node-compat in .circleci/config.yml.
2525
OLDEST_SUPPORTED_NODE = 180300
2626

2727

2828
class Feature(IntEnum):
2929
NON_TRAPPING_FPTOINT = auto()
30-
SIGN_EXT = auto()
3130
BULK_MEMORY = auto()
3231
JS_BIGINT_INTEGRATION = auto()
33-
THREADS = auto()
3432
MEMORY64 = auto()
3533
WORKER_ES6_MODULES = auto()
3634
OFFSCREENCANVAS_SUPPORT = auto()
@@ -44,19 +42,14 @@ class Feature(IntEnum):
4442
disable_override_features = set()
4543
enable_override_features = set()
4644

45+
4746
min_browser_versions = {
4847
Feature.NON_TRAPPING_FPTOINT: {
4948
'chrome': 75,
5049
'firefox': 65,
5150
'safari': 150000,
5251
'node': 130000,
5352
},
54-
Feature.SIGN_EXT: {
55-
'chrome': 74,
56-
'firefox': 62,
57-
'safari': 140100,
58-
'node': 120000,
59-
},
6053
Feature.BULK_MEMORY: {
6154
'chrome': 75,
6255
'firefox': 79,
@@ -69,12 +62,6 @@ class Feature(IntEnum):
6962
'safari': 150000,
7063
'node': 130000,
7164
},
72-
Feature.THREADS: {
73-
'chrome': 74,
74-
'firefox': 79,
75-
'safari': 140100,
76-
'node': 160400,
77-
},
7865
Feature.MEMORY64: {
7966
'chrome': 128,
8067
'firefox': 129,
@@ -146,6 +133,38 @@ class Feature(IntEnum):
146133
'safari': UNSUPPORTED,
147134
'node': 240000,
148135
},
136+
137+
# The following features we now support unconditaionlly, but keeping them around
138+
# in code comments for future reference
139+
140+
# Feature.MUTABLE_GLOBALS: {
141+
# 'chrome': 74,
142+
# 'firefox': 61,
143+
# 'safari': 130100,
144+
# 'node': 120000,
145+
# },
146+
147+
# Feature.SIGN_EXT: {
148+
# 'chrome': 74,
149+
# 'firefox': 62,
150+
# 'safari': 140100,
151+
# 'node': 120000,
152+
# },
153+
154+
# Feature.THREADS: {
155+
# 'chrome': 74,
156+
# 'firefox': 79,
157+
# 'safari': 140100,
158+
# 'node': 160400,
159+
# },
160+
161+
# Feature.PROMISE_ANY: {
162+
# 'chrome': 85,
163+
# 'firefox': 79,
164+
# 'safari': 140000,
165+
# 'node': 150000,
166+
# },
167+
149168
}
150169

151170
# Static assertion to check that we actually need each of the above feature flags
@@ -225,7 +244,6 @@ def apply_min_browser_versions():
225244
# unless the user explicitly enabled it.
226245
enable_feature(Feature.JS_BIGINT_INTEGRATION, 'WASM_BIGINT')
227246
if settings.PTHREADS:
228-
enable_feature(Feature.THREADS, 'pthreads')
229247
enable_feature(Feature.BULK_MEMORY, 'pthreads')
230248
elif settings.WASM_WORKERS or settings.SHARED_MEMORY:
231249
enable_feature(Feature.BULK_MEMORY, 'shared-mem')

0 commit comments

Comments
 (0)