Add an experimental `CommandLine.executablePath` property.
This PR adds CommandLine.executablePath. We have use cases for this property in Swift Testing, Swift Argument Parser, Foundation, and other places; three use cases a stdlib API makes.
Need to consider how best to handle back-deployment on Apple platforms. It should be possible to support back-deployment since the underlying crt_extern function has been present for decades, however calling it may prove non-trivial. I haven't made an attempt at it yet.
Pending Swift Evolution review. We can mark this @_spi or underscored in the mean time.
@3405691582 Could use your eyes on the OpenBSD implementation, of course.
@swift-ci test
@swift-ci test
@swift-ci test Windows
@swift-ci test
@swift-ci test
@swift-ci test
@swift-ci test
@swift-ci test
@swift-ci test
@swift-ci test
but I think that's about as good as we can manage on the platform.
Indeed, this is just a limitation we have to live with. (I suppose we could try splitting $PATH, concatenating each path, and checking if it exists, but realistically…)
The Windows failure is unrelated and the macOS failure is just the ABI test needing an update. Will revisit in January.
@swift-ci test
@swift-ci test
@swift-ci test
@swift-ci test
@swift-ci test
@3405691582 Some changes to the OpenBSD implementation if you want to look again.
@swift-ci test
@swift-ci test
@swift-ci test
@swift-ci test
@swift-ci test
@swift-ci smoke test
@swift-ci test
@swift-ci test
@swift-ci test
The current macOS failure is unrelated and appears to be a compiler regression in move-only codegen.
@swift-ci smoke test macOS