File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -1230,6 +1230,26 @@ elif run_os == 'wasi':
1230
1230
config .target_sdk_name = "wasi"
1231
1231
config .target_runtime = "native"
1232
1232
1233
+ # Exclude test cases that use objc-interop because clang doesn't support it
1234
+ # with WebAssembly binary file yet.
1235
+ testfiles = glob .glob (os .path .join (config .test_source_root , "**" , "*.swift" ))
1236
+
1237
+ def use_objc_interop (path ):
1238
+ with open (path ) as f :
1239
+ return '-enable-objc-interop' in f .read ()
1240
+
1241
+ import fnmatch
1242
+ def objc_interop_enabled_filenames (path , filename_pat ):
1243
+ matches = []
1244
+ for root , dirnames , filenames in os .walk (path ):
1245
+ for filename in fnmatch .filter (filenames , filename_pat ):
1246
+ filepath = os .path .join (root , filename )
1247
+ if not use_objc_interop (filepath ): continue
1248
+ matches .append (filename )
1249
+ return matches
1250
+
1251
+ config .excludes += objc_interop_enabled_filenames (config .test_source_root , "*.swift" )
1252
+
1233
1253
config .target_swift_autolink_extract = inferSwiftBinary ("swift-autolink-extract" )
1234
1254
1235
1255
config .target_build_swift = ' ' .join ([
You can’t perform that action at this time.
0 commit comments