Skip to content

Commit b51b8d2

Browse files
authored
Merge pull request #74603 from hyp/eng/android-link-cxxstdlib
[cxx-interop][android] link with CxxStdlib when building for Android too
2 parents 2a9744d + 658d1e5 commit b51b8d2

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
@@ -537,19 +537,14 @@ swift::dependencies::registerCxxInteropLibraries(
537537
})) {
538538
// Only link with CxxStdlib on platforms where the overlay is available.
539539
switch (Target.getOS()) {
540-
case llvm::Triple::Linux:
541-
if (!Target.isAndroid())
542-
RegistrationCallback(LinkLibrary("swiftCxxStdlib",
543-
LibraryKind::Library));
544-
break;
545540
case llvm::Triple::Win32: {
546541
RegistrationCallback(
547542
LinkLibrary(hasStaticCxxStdlib ? "libswiftCxxStdlib" : "swiftCxxStdlib",
548543
LibraryKind::Library));
549544
break;
550545
}
551546
default:
552-
if (Target.isOSDarwin())
547+
if (Target.isOSDarwin() || Target.isOSLinux())
553548
RegistrationCallback(LinkLibrary("swiftCxxStdlib",
554549
LibraryKind::Library));
555550
break;

0 commit comments

Comments
 (0)