Skip to content

Commit 17d3335

Browse files
authored
Fix comment about LTO and autolinking in lit.cfg (#39362)
1 parent bc1647a commit 17d3335

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

test/lit.cfg

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -946,13 +946,9 @@ if run_vendor == 'apple':
946946
lit_config.note('Using freestanding resource dir: ' + new_resource_dir)
947947

948948
# Auto-linking does not work when stdlib is built with LTO, because linked
949-
# libraries are discovered too late (after optimizations are applied). Let's
950-
# explicitly link all libraries needed in tests.
951-
#
952-
# Note that this won't work on Linux (without LLD). The autolinking
953-
# mechanism on Linux will fail due to needing -L arguments to the path even
954-
# with this forced linking as the extracted commands will force the linker
955-
# to look up the linking by name as well.
949+
# libraries are discovered too late (after optimizations are applied), and
950+
# ld64 hits an assert and crashes. Until ld64 fixes this, let's workaround
951+
# it by explicitly -l linking all libraries needed in tests.
956952
if "stdlib_lto" in config.available_features:
957953
for library in ["swiftCore", "swiftStdlibUnittest",
958954
"swiftSwiftPrivateLibcExtras", "swiftSwiftPrivate",

0 commit comments

Comments
 (0)