mirror of
https://github.com/apple/swift.git
synced 2026-10-20 19:13:47 +02:00
This PR implements the C++ back end of `CommandLine.executablePath` as approved in [SE-0513](https://github.com/swiftlang/swift-evolution/blob/main/proposals/0513-commandline-executablepath.md). The front end that exposes a `FilePath`-based API is blocked on the existence of `FilePath` in the standard library, but some toolchain components like Swift Testing need to back-deploy and can't link to the System package directly, so they need to directly use the C++ implementation. Darwin doesn't need this implementation as it has `_NSGetExecutablePath()` that will be used by the back-deployable Darwin implementation instead of this helper function.