Skip to content

Reapply "Infer object format when it can't be determined from a triple's successfully parsed environment #208

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

Merged
merged 2 commits into from
Aug 22, 2020

Conversation

owenv
Copy link
Contributor

@owenv owenv commented Aug 15, 2020

Testing another potential fix - If a tool can't be found relative to the driver library's client executable, look for it relative to the frontend instead

… a triple's successfully parsed environment""
@owenv owenv marked this pull request as draft August 15, 2020 07:02
@owenv owenv force-pushed the revert-203-revert-201-object-format-fix branch from 8084737 to 8179c27 Compare August 15, 2020 21:53
Comment on lines +131 to +137
} else if !["swift-frontend", "swift"].contains(executable),
let parentDirectory = try? getToolPath(.swiftCompiler).parentDirectory,
parentDirectory != executableDir,
let path = lookupExecutablePath(filename: executable, searchPaths: [parentDirectory]) {
// If the driver library's client and the frontend are in different directories,
// try looking for tools next to the frontend.
return path
Copy link
Contributor Author

@owenv owenv Aug 16, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is kind of a hack, not sure if there's a better way to solve this that doesn't involve overriding the path to every toolchain tool individually

@owenv
Copy link
Contributor Author

owenv commented Aug 16, 2020

With swiftlang/swift-package-manager#2871, this now passes SPM CI testing

@swift-ci test

@owenv owenv marked this pull request as ready for review August 21, 2020 04:13
@owenv
Copy link
Contributor Author

owenv commented Aug 21, 2020

With the SPM change merged, this should be safe to reapply so long as swift-driver tests still pass

@swift-ci test

@owenv
Copy link
Contributor Author

owenv commented Aug 22, 2020

@swift-ci test

@owenv owenv merged commit 0666f04 into swiftlang:master Aug 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants