diff --git a/src/settings.js b/src/settings.js index a7aedbee19978..8d64785cfab95 100644 --- a/src/settings.js +++ b/src/settings.js @@ -1913,7 +1913,7 @@ var MIN_FIREFOX_VERSION = 79; // Minimum supported value is 101000 which was released in 2016-09 (see // feature_matrix.py). // [link] -var MIN_SAFARI_VERSION = 140100; +var MIN_SAFARI_VERSION = 150000; // Specifies the oldest version of Chrome. E.g. pass -sMIN_CHROME_VERSION=58 to // drop support for Chrome 57 and older. diff --git a/src/shell.js b/src/shell.js index b813e3edbcf44..149fd65adbe88 100644 --- a/src/shell.js +++ b/src/shell.js @@ -34,8 +34,7 @@ var Module = typeof {{{ EXPORT_NAME }}} != 'undefined' ? {{{ EXPORT_NAME }}} : { #endif // USE_CLOSURE_COMPILER #if POLYFILL -#if WASM_BIGINT && MIN_SAFARI_VERSION < 140100 -// TODO(https://github.com/emscripten-core/emscripten/issues/23184): Fix this back to 150000 +#if WASM_BIGINT && MIN_SAFARI_VERSION < 150000 // See https://caniuse.com/mdn-javascript_builtins_bigint64array #include "polyfill/bigint64array.js" #endif diff --git a/test/test_other.py b/test/test_other.py index 879865606d0e9..72d0970c3536d 100644 --- a/test/test_other.py +++ b/test/test_other.py @@ -10443,6 +10443,7 @@ def verify_features_sec_linked(feature, expect_in): def compile(flags): self.run_process([EMCC, test_file('hello_world.c')] + flags) + # Default features, unlinked and linked compile(['-c']) verify_features_sec('bulk-memory', True) verify_features_sec('nontrapping-fptoint', True) @@ -10451,17 +10452,28 @@ def compile(flags): verify_features_sec('multivalue', True) verify_features_sec('reference-types', True) + compile([]) + verify_features_sec_linked('sign-ext', True) + verify_features_sec_linked('mutable-globals', True) + verify_features_sec_linked('multivalue', True) + verify_features_sec_linked('bulk-memory-opt', True) + verify_features_sec_linked('nontrapping-fptoint', True) + verify_features_sec_linked('reference-types', True) + # Disable a feature compile(['-mno-sign-ext', '-c']) verify_features_sec('sign-ext', False) # Disable via browser selection compile(['-sMIN_FIREFOX_VERSION=61']) verify_features_sec_linked('sign-ext', False) + compile(['-sMIN_SAFARI_VERSION=140100']) + verify_features_sec_linked('bulk-memory-opt', False) + verify_features_sec_linked('nontrapping-fptoint', False) # Flag disabling overrides default browser versions compile(['-mno-sign-ext']) verify_features_sec_linked('sign-ext', False) # Flag disabling overrides explicit browser version - compile(['-sMIN_SAFARI_VERSION=150000', '-mno-sign-ext']) + compile(['-sMIN_SAFARI_VERSION=160000', '-mno-sign-ext']) verify_features_sec_linked('sign-ext', False) # Flag enabling overrides explicit browser version compile(['-sMIN_FIREFOX_VERSION=61', '-msign-ext']) @@ -10470,18 +10482,6 @@ def compile(flags): compile(['-sMIN_SAFARI_VERSION=150000', '-mno-bulk-memory']) verify_features_sec_linked('bulk-memory-opt', False) - # TODO(https://github.com/emscripten-core/emscripten/issues/23184) set this back to 14.1 - # Also the section below can be deleted/updated once the default is 15.1 - compile(['-sMIN_SAFARI_VERSION=140000']) - verify_features_sec_linked('bulk-memory-opt', False) - verify_features_sec_linked('nontrapping-fptoint', False) - - compile(['-sMIN_SAFARI_VERSION=150000']) - verify_features_sec_linked('sign-ext', True) - verify_features_sec_linked('mutable-globals', True) - verify_features_sec_linked('multivalue', True) - verify_features_sec_linked('bulk-memory-opt', True) - verify_features_sec_linked('nontrapping-fptoint', True) def test_js_preprocess(self): # Use stderr rather than stdout here because stdout is redirected to the output JS file itself. @@ -12360,8 +12360,7 @@ def fail(args, details): # plain -O0 legalization_message = 'to disable int64 legalization (which requires changes after link) use -sWASM_BIGINT' fail(['-sWASM_BIGINT=0'], legalization_message) - # TODO(https://github.com/emscripten-core/emscripten/issues/23184): change this back to 140100 after 15 is default - fail(['-sMIN_SAFARI_VERSION=140000'], legalization_message) + fail(['-sMIN_SAFARI_VERSION=140100'], legalization_message) # optimized builds even without legalization optimization_message = '-O2+ optimizations always require changes, build with -O0 or -O1 instead' fail(['-O2'], optimization_message) @@ -14435,8 +14434,7 @@ def test_reproduce(self): def test_min_browser_version(self): err = self.expect_fail([EMCC, test_file('hello_world.c'), '-Wno-transpile', '-Werror', '-sWASM_BIGINT', '-sMIN_SAFARI_VERSION=120000']) - # TODO(https://github.com/emscripten-core/emscripten/issues/23184): fix back to 15000 once Safari 15 is default - self.assertContained('emcc: error: MIN_SAFARI_VERSION=120000 is not compatible with WASM_BIGINT (140100 or above required)', err) + self.assertContained('emcc: error: MIN_SAFARI_VERSION=120000 is not compatible with WASM_BIGINT (150000 or above required)', err) err = self.expect_fail([EMCC, test_file('hello_world.c'), '-Wno-transpile', '-Werror', '-pthread', '-sMIN_CHROME_VERSION=73']) self.assertContained('emcc: error: MIN_CHROME_VERSION=73 is not compatible with pthreads (74 or above required)', err) diff --git a/tools/feature_matrix.py b/tools/feature_matrix.py index 75d6872f28e17..b9253e81337be 100644 --- a/tools/feature_matrix.py +++ b/tools/feature_matrix.py @@ -46,7 +46,7 @@ class Feature(IntEnum): Feature.NON_TRAPPING_FPTOINT: { 'chrome': 75, 'firefox': 65, - 'safari': 140100, # TODO: Reset back to 150000 when the default changes + 'safari': 150000, 'node': 130000, }, Feature.SIGN_EXT: { @@ -58,7 +58,7 @@ class Feature(IntEnum): Feature.BULK_MEMORY: { 'chrome': 75, 'firefox': 79, - 'safari': 140100, # TODO: Reset this to 150000 when we update the default. + 'safari': 150000, 'node': 130000, }, Feature.MUTABLE_GLOBALS: { @@ -70,7 +70,7 @@ class Feature(IntEnum): Feature.JS_BIGINT_INTEGRATION: { 'chrome': 67, 'firefox': 68, - 'safari': 140100, # TODO(https://github.com/emscripten-core/emscripten/issues/23184): set this back to 15 after we update the default targets. + 'safari': 150000, 'node': 130000, }, Feature.THREADS: {