Skip to content

Commit 7dbfcb7

Browse files
Workaround for broken implicit import auto static linking
1 parent 4c770b4 commit 7dbfcb7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/lit.cfg

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1511,6 +1511,13 @@ elif run_os == 'wasi':
15111511
'-target', config.variant_triple,
15121512
'-Xcc', '--sysroot=%s' % config.variant_sdk,
15131513
'-Xclang-linker', '--sysroot=%s' % config.variant_sdk,
1514+
# workaroud: Even though StdlibUnittest uses _Concurrency,
1515+
# _Concurrency module won't be listed in IMPORTED_MODULE.
1516+
# And -parse-stdlib disables implicit imports, so autolink
1517+
# system is broken when static link & -parse-stdlib & importing _Concurrency.
1518+
# This issue causes link failure that reports there are missing swift_task_XX
1519+
# symbols.
1520+
'-lswift_Concurrency',
15141521
'-toolchain-stdlib-rpath', resource_dir_opt,
15151522
mcp_opt, config.swift_test_options,
15161523
config.swift_driver_test_options, swift_execution_tests_extra_flags])

0 commit comments

Comments
 (0)