@@ -10448,6 +10448,7 @@ def verify_features_sec_linked(feature, expect_in):
1044810448 def compile(flags):
1044910449 self.run_process([EMCC, test_file('hello_world.c')] + flags)
1045010450
10451+ # Default features, unlinked and linked
1045110452 compile(['-c'])
1045210453 verify_features_sec('bulk-memory', True)
1045310454 verify_features_sec('nontrapping-fptoint', True)
@@ -10456,17 +10457,28 @@ def compile(flags):
1045610457 verify_features_sec('multivalue', True)
1045710458 verify_features_sec('reference-types', True)
1045810459
10460+ compile([])
10461+ verify_features_sec_linked('sign-ext', True)
10462+ verify_features_sec_linked('mutable-globals', True)
10463+ verify_features_sec_linked('multivalue', True)
10464+ verify_features_sec_linked('bulk-memory-opt', True)
10465+ verify_features_sec_linked('nontrapping-fptoint', True)
10466+ verify_features_sec_linked('reference-types', True)
10467+
1045910468 # Disable a feature
1046010469 compile(['-mno-sign-ext', '-c'])
1046110470 verify_features_sec('sign-ext', False)
1046210471 # Disable via browser selection
1046310472 compile(['-sMIN_FIREFOX_VERSION=61'])
1046410473 verify_features_sec_linked('sign-ext', False)
10474+ compile(['-sMIN_SAFARI_VERSION=140100'])
10475+ verify_features_sec_linked('bulk-memory-opt', False)
10476+ verify_features_sec_linked('nontrapping-fptoint', False)
1046510477 # Flag disabling overrides default browser versions
1046610478 compile(['-mno-sign-ext'])
1046710479 verify_features_sec_linked('sign-ext', False)
1046810480 # Flag disabling overrides explicit browser version
10469- compile(['-sMIN_SAFARI_VERSION=150000 ', '-mno-sign-ext'])
10481+ compile(['-sMIN_SAFARI_VERSION=160000 ', '-mno-sign-ext'])
1047010482 verify_features_sec_linked('sign-ext', False)
1047110483 # Flag enabling overrides explicit browser version
1047210484 compile(['-sMIN_FIREFOX_VERSION=61', '-msign-ext'])
@@ -10475,18 +10487,12 @@ def compile(flags):
1047510487 compile(['-sMIN_SAFARI_VERSION=150000', '-mno-bulk-memory'])
1047610488 verify_features_sec_linked('bulk-memory-opt', False)
1047710489
10478- # TODO(https://github.com/emscripten-core/emscripten/issues/23184) set this back to 14.1
10479- # Also the section below can be deleted/updated once the default is 15.1
10480- compile(['-sMIN_SAFARI_VERSION=140000'])
10490+ # Bigint ovrride does not cause other features to enable
10491+ compile(['-sMIN_SAFARI_VERSION=140100', '-sWASM_BIGINT=1'])
1048110492 verify_features_sec_linked('bulk-memory-opt', False)
10482- verify_features_sec_linked('nontrapping-fptoint', False)
1048310493
10484- compile(['-sMIN_SAFARI_VERSION=150000'])
10485- verify_features_sec_linked('sign-ext', True)
10486- verify_features_sec_linked('mutable-globals', True)
10487- verify_features_sec_linked('multivalue', True)
10488- verify_features_sec_linked('bulk-memory-opt', True)
10489- verify_features_sec_linked('nontrapping-fptoint', True)
10494+ compile(['-sMIN_SAFARI_VERSION=140100', '-mbulk-memory'])
10495+ verify_features_sec_linked('nontrapping-fptoint', False)
1049010496
1049110497 def test_js_preprocess(self):
1049210498 # Use stderr rather than stdout here because stdout is redirected to the output JS file itself.
@@ -12365,8 +12371,7 @@ def fail(args, details):
1236512371 # plain -O0
1236612372 legalization_message = 'to disable int64 legalization (which requires changes after link) use -sWASM_BIGINT'
1236712373 fail(['-sWASM_BIGINT=0'], legalization_message)
12368- # TODO(https://github.com/emscripten-core/emscripten/issues/23184): change this back to 140100 after 15 is default
12369- fail(['-sMIN_SAFARI_VERSION=140000'], legalization_message)
12374+ fail(['-sMIN_SAFARI_VERSION=140100'], legalization_message)
1237012375 # optimized builds even without legalization
1237112376 optimization_message = '-O2+ optimizations always require changes, build with -O0 or -O1 instead'
1237212377 fail(['-O2'], optimization_message)
@@ -14440,8 +14445,7 @@ def test_reproduce(self):
1444014445
1444114446 def test_min_browser_version(self):
1444214447 err = self.expect_fail([EMCC, test_file('hello_world.c'), '-Wno-transpile', '-Werror', '-sWASM_BIGINT', '-sMIN_SAFARI_VERSION=120000'])
14443- # TODO(https://github.com/emscripten-core/emscripten/issues/23184): fix back to 15000 once Safari 15 is default
14444- self.assertContained('emcc: error: MIN_SAFARI_VERSION=120000 is not compatible with WASM_BIGINT (140100 or above required)', err)
14448+ self.assertContained('emcc: error: MIN_SAFARI_VERSION=120000 is not compatible with WASM_BIGINT (150000 or above required)', err)
1444514449
1444614450 err = self.expect_fail([EMCC, test_file('hello_world.c'), '-Wno-transpile', '-Werror', '-pthread', '-sMIN_CHROME_VERSION=73'])
1444714451 self.assertContained('emcc: error: MIN_CHROME_VERSION=73 is not compatible with pthreads (74 or above required)', err)
0 commit comments