Skip to content

Commit 658d1e5

Browse files
committed
[cxx-interop][android] link with CxxStdlib when building for Android too
1 parent c8b5344 commit 658d1e5

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

lib/AST/ModuleDependencies.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -536,19 +536,14 @@ swift::dependencies::registerCxxInteropLibraries(
536536
})) {
537537
// Only link with CxxStdlib on platforms where the overlay is available.
538538
switch (Target.getOS()) {
539-
case llvm::Triple::Linux:
540-
if (!Target.isAndroid())
541-
RegistrationCallback(LinkLibrary("swiftCxxStdlib",
542-
LibraryKind::Library));
543-
break;
544539
case llvm::Triple::Win32: {
545540
RegistrationCallback(
546541
LinkLibrary(hasStaticCxxStdlib ? "libswiftCxxStdlib" : "swiftCxxStdlib",
547542
LibraryKind::Library));
548543
break;
549544
}
550545
default:
551-
if (Target.isOSDarwin())
546+
if (Target.isOSDarwin() || Target.isOSLinux())
552547
RegistrationCallback(LinkLibrary("swiftCxxStdlib",
553548
LibraryKind::Library));
554549
break;

0 commit comments

Comments
 (0)