File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -468,6 +468,10 @@ void IRGenModule::emitSourceFile(SourceFile &SF) {
468
468
469
469
if (ObjCInterop)
470
470
this ->addLinkLibrary (LinkLibrary (" objc" , LibraryKind::Library));
471
+
472
+ // Automatically with libc++ when possible.
473
+ if (Context.LangOpts .EnableCXXInterop && Context.LangOpts .Target .isOSDarwin ())
474
+ this ->addLinkLibrary (LinkLibrary (" c++" , LibraryKind::Library));
471
475
472
476
// FIXME: It'd be better to have the driver invocation or build system that
473
477
// executes the linker introduce these compatibility libraries, since at
Original file line number Diff line number Diff line change 1
- // RUN: %target-run-simple-swift(-I %S/Inputs -Xfrontend -enable-cxx-interop -lc++ )
1
+ // RUN: %target-run-simple-swift(-I %S/Inputs -Xfrontend -enable-cxx-interop)
2
2
//
3
3
// REQUIRES: executable_test
4
4
//
You can’t perform that action at this time.
0 commit comments