Skip to content

Commit 51ffac7

Browse files
committed
Update safari version, update pass name, fixes
1 parent aeabee7 commit 51ffac7

File tree

5 files changed

+4
-30
lines changed

5 files changed

+4
-30
lines changed

emcc.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -385,12 +385,6 @@ def get_clang_flags(user_args):
385385
if '-mbulk-memory' not in user_args:
386386
flags.append('-mbulk-memory')
387387

388-
# In emscripten we currently disable bulk memory by default.
389-
# This should be removed/updated when we als update the default browser targets.
390-
#if '-mbulk-memory' not in user_args and '-mno-bulk-memory' not in user_args:
391-
# Bulk memory may be enabled via threads or directly via -s.
392-
# if not settings.BULK_MEMORY:
393-
# flags.append('-mno-bulk-memory')
394388
if '-mnontrapping-fptoint' not in user_args and '-mno-nontrapping-fptoint' not in user_args:
395389
flags.append('-mno-nontrapping-fptoint')
396390

test/test_other.py

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8511,7 +8511,7 @@ def test_binaryen_warn_mem(self):
85118511
self.run_process([EMCC, test_file('hello_world.c'), '-sINITIAL_MEMORY=' + str(16 * 1024 * 1024), '--pre-js', 'pre.js', '-sWASM_ASYNC_COMPILATION=0', '-sIMPORTED_MEMORY'])
85128512
out = self.run_js('a.out.js', assert_returncode=NON_ZERO)
85138513
self.assertContained('LinkError', out)
8514-
self.assertContained("memory import 2 has a larger maximum size 800 than the module's declared maximum", out)
8514+
self.assertContained("memory import 1 has a larger maximum size 800 than the module's declared maximum", out)
85158515
self.assertNotContained('hello, world!', out)
85168516
# and with memory growth, all should be good
85178517
self.run_process([EMCC, test_file('hello_world.c'), '-sINITIAL_MEMORY=' + str(16 * 1024 * 1024), '--pre-js', 'pre.js', '-sALLOW_MEMORY_GROWTH', '-sWASM_ASYNC_COMPILATION=0', '-sIMPORTED_MEMORY'])
@@ -10458,18 +10458,10 @@ def compile(flags):
1045810458
compile(['-mnontrapping-fptoint', '-c'])
1045910459
verify_features_sec('nontrapping-fptoint', True)
1046010460

10461-
compile(['-sMIN_SAFARI_VERSION=120000'])
10462-
verify_features_sec_linked('sign-ext', False)
10463-
1046410461
compile(['-sMIN_SAFARI_VERSION=140000'])
10465-
verify_features_sec_linked('bulk-memory', True) # XXX fix before commit
10462+
verify_features_sec_linked('bulk-memory', False)
1046610463
verify_features_sec_linked('nontrapping-fptoint', False)
1046710464

10468-
compile(['-sMIN_SAFARI_VERSION=140100', '-pthread'])
10469-
verify_features_sec_linked('atomics', True)
10470-
verify_features_sec_linked('bulk-memory', True)
10471-
10472-
# BIGINT causes binaryen to not run, and keeps the target_features section after link
1047310465
# Setting this SAFARI_VERSION should enable bulk memory because it links in emscripten_memcpy_bulkmem
1047410466
# However it does not enable nontrapping-fptoint yet because it has no effect at compile time and
1047510467
# no libraries include nontrapping yet.
@@ -10484,14 +10476,6 @@ def compile(flags):
1048410476
# -mno-bulk-memory at link time overrides MIN_SAFARI_VERSION
1048510477
verify_features_sec_linked('bulk-memory', False)
1048610478

10487-
# feature_matrix has the (IMO strange) behavior that enabling one feature supported by
10488-
# a particular browser version will cause all other features supported by that version
10489-
# to be enabled as well.
10490-
# TODO: is this test redundant with test_signext_lowering?
10491-
compile(['-sWASM_BIGINT'])
10492-
verify_features_sec_linked('bulk-memory', True)
10493-
verify_features_sec_linked('nontrapping-fptoint', True)
10494-
1049510479
def test_js_preprocess(self):
1049610480
# Use stderr rather than stdout here because stdout is redirected to the output JS file itself.
1049710481
create_file('lib.js', '''

tools/feature_matrix.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class Feature(IntEnum):
5656
Feature.BULK_MEMORY: {
5757
'chrome': 75,
5858
'firefox': 79,
59-
'safari': 150000,
59+
'safari': 140100, # TODO: Reset this to 150000 when we update the default.
6060
},
6161
Feature.MUTABLE_GLOBALS: {
6262
'chrome': 74,

tools/link.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ def get_binaryen_passes():
342342
passes += ['--signext-lowering']
343343
if not feature_matrix.caniuse(feature_matrix.Feature.BULK_MEMORY):
344344
logger.debug('lowering bulk-memory feature due to incompatible target browser engines')
345-
passes += ['--memory-copy-fill-lowering']
345+
passes += ['--llvm-memory-copy-fill-lowering']
346346
if optimizing:
347347
passes += ['--post-emscripten']
348348
if settings.SIDE_MODULE:

tools/system_libs.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2191,10 +2191,6 @@ def get_files(self):
21912191
filenames=['standalone.c',
21922192
'standalone_wasm_stdio.c',
21932193
'__main_void.c'])
2194-
files += files_in_path(
2195-
path='system/lib/libc',
2196-
filenames=['emscripten_memcpy.c', 'emscripten_memset.c',
2197-
]) # XXX why do we need the C files here but not the S files?
21982194
# It is more efficient to use JS methods for time, normally.
21992195
files += files_in_path(
22002196
path='system/lib/libc/musl/src/time',

0 commit comments

Comments
 (0)