@@ -10278,20 +10278,30 @@ def verify_features_sec(feature, expect_in):
10278
10278
else:
10279
10279
self.assertFalse(feature in features)
10280
10280
10281
- def compile(flag ):
10282
- self.run_process([EMCC, test_file('hello_world.c'), '-c', flag] )
10281
+ def compile(flags ):
10282
+ self.run_process([EMCC, test_file('hello_world.c'), '-c'] + flags )
10283
10283
10284
- compile('' )
10284
+ compile([] )
10285
10285
verify_features_sec('bulk-memory', False)
10286
10286
verify_features_sec('nontrapping-fptoint', False)
10287
10287
verify_features_sec('sign-ext', True)
10288
10288
verify_features_sec('mutable-globals', True)
10289
10289
verify_features_sec('multivalue', True)
10290
+ verify_features_sec('reference-types', True)
10290
10291
10291
- compile('-sMIN_SAFARI_VERSION=150000')
10292
+ compile(['-mnontrapping-fptoint'])
10293
+ verify_features_sec('nontrapping-fptoint', True)
10294
+
10295
+ compile(['-sMIN_SAFARI_VERSION=150000'])
10296
+ verify_features_sec('sign-ext', True)
10297
+ verify_features_sec('mutable-globals', True)
10298
+ verify_features_sec('multivalue', True)
10292
10299
verify_features_sec('bulk-memory', True)
10293
10300
verify_features_sec('nontrapping-fptoint', True)
10294
10301
10302
+ compile(['-sMIN_SAFARI_VERSION=150000', '-mno-bulk-memory'])
10303
+ verify_features_sec('bulk-memory', False)
10304
+
10295
10305
def test_js_preprocess(self):
10296
10306
# Use stderr rather than stdout here because stdout is redirected to the output JS file itself.
10297
10307
create_file('lib.js', '''
0 commit comments