-
Notifications
You must be signed in to change notification settings - Fork 196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
swift-driver: correct the legacy driver path construction #1741
Conversation
Use `URL` to compute the new executable name. This is important to ensure that we correctly strip the executable suffix and re-apply it in the proper location if applicable. Without this change, on Windows, the fallback path would generate `swiftc.exe-legacy-driver` rather than `swiftc-legacy-driver.exe` for the basename of the C++ driver.
@swift-ci please test |
@swift-ci please test macOS platform |
Please test with following PRs: @swift-ci please test Windows platform |
@swift-ci please test macOS platform |
@artemcm @compnerd is it possible this is related to https://ci.swift.org/job/swift-PR-Linux/18443/console |
I've merged the revert because it looks like this broke PR testing. |
swiftlang/swift-driver#1741 fixed a bug in the swift-driver which exposed a bug in this test. The use of `%FileCheck` is a problem as that sanitises the output substituting `BUILD_DIR` for the build directory that is now properly computed. Because `PATH` is being configured to an invalid path the actual driver is not found and the test fails.
Use
URL
to compute the new executable name. This is important to ensure that we correctly strip the executable suffix and re-apply it in the proper location if applicable. Without this change, on Windows, the fallback path would generateswiftc.exe-legacy-driver
rather thanswiftc-legacy-driver.exe
for the basename of the C++ driver.