Skip to content

Commit 00b327f

Browse files
committed
[cxx-interop] Do not try linking with swiftstd
This fixes an ld warning: ``` ld: warning: Could not find or use auto-linked library ‘swiftstd’ ``` `swiftstd` was renamed to `swiftCxxStdlib`. We were still trying to link with `swiftstd` for some time to allow building with hosttools and to keep the CI green, however a new toolchain was released since the module was renamed, so this is no longer needed. rdar://107412807
1 parent 4a68116 commit 00b327f

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lib/IRGen/GenDecl.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -490,15 +490,13 @@ void IRGenModule::emitSourceFile(SourceFile &SF) {
490490
if (!getSwiftModule()->getName().is("Cxx"))
491491
this->addLinkLibrary(LinkLibrary("swiftCxx", LibraryKind::Library));
492492

493-
// Only link with std on platforms where the overlay is available.
494-
// Do not try to link std with itself.
493+
// Only link with CxxStdlib on platforms where the overlay is available.
494+
// Do not try to link CxxStdlib with itself.
495495
if ((target.isOSDarwin() || (target.isOSLinux() && !target.isAndroid())) &&
496496
!getSwiftModule()->getName().is("Cxx") &&
497497
!getSwiftModule()->getName().is("CxxStdlib") &&
498498
!getSwiftModule()->getName().is("std")) {
499499
this->addLinkLibrary(LinkLibrary("swiftCxxStdlib", LibraryKind::Library));
500-
if (target.isOSDarwin())
501-
this->addLinkLibrary(LinkLibrary("swiftstd", LibraryKind::Library));
502500
}
503501
}
504502

0 commit comments

Comments
 (0)