mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
This doesn't yet allow including C++ headers on platforms where libc++ isn't the default; see comments in UnixToolChains.cpp for details. However, it does, for example, allow throwing and catching exceptions in C++ code used through interop, unblocking https://github.com/apple/swift/pull/30674/files. The flags (-enable-experimental-cxx-interop and -experimental-cxx-stdlib) carry "experimental" in the name to emphasize that C++ interop is still an experimental feature. Co-authored-by: Michael Forster <forster@google.com>
11 lines
474 B
Swift
11 lines
474 B
Swift
// RUN: %swiftc_driver -driver-print-jobs -target x86_64-apple-macosx10.9 %s -enable-experimental-cxx-interop 2>^1 | %FileCheck -check-prefix ENABLE %s
|
|
|
|
// RUN: %swiftc_driver -driver-print-jobs -target x86_64-apple-macosx10.9 %s -enable-experimental-cxx-interop -experimental-cxx-stdlib libc++ 2>^1 | %FileCheck -check-prefix STDLIB %s
|
|
|
|
// ENABLE: swift
|
|
// ENABLE: -enable-cxx-interop
|
|
|
|
// STDLIB: swift
|
|
// STDLIB-DAG: -enable-cxx-interop
|
|
// STDLIB-DAG: -Xcc -stdlib=libc++
|