-
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
Add SDK and platform paths to plugin executables #1377
Add SDK and platform paths to plugin executables #1377
Conversation
@swift-ci please test |
// Given a virtual path pointing into a toolchain/SDK/platform, produce the | ||
// path to `swift-plugin-server`. | ||
fileprivate var pluginServerPath: VirtualPath { | ||
self.appending(components: "usr", "swift-plugin-server") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
usr/bin
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Though seems like the rest don't have usr
, so is this actually intended to be bin
?
EDIT: Yeah, the root path below is "Developer", "usr"
so I assume this should be bin
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're absolutely right.
return | ||
} | ||
|
||
let jobs = try driver.planBuild().removingAutolinkExtractJobs() | ||
XCTAssertEqual(jobs.count, 1) | ||
let job = jobs.first! | ||
XCTAssertTrue(job.commandLine.contains(.flag("-external-plugin-path"))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be worth checking the path here 😅
if isFrontendArgSupported(.pluginPath) { | ||
// Emit user-provided plugin paths, in order. | ||
if isFrontendArgSupported(.externalPluginPath) { | ||
try commandLine.appendAll(.pluginPath, .externalPluginPath, from: &parsedOptions) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aren't we passing load-plugin-library
and load-plugin-executable
? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think those also need to be handled in this same group, yes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Woah, those aren't being passed at all!
Improve on the prior implementation of adding SDK and platform external plugin path arguments in a few ways: * Only do this for Darwin, because other platforms don't have similar abstractions at the moment * Fix incorrect paths, because I had not written tests * Add tests, because otherwise nobody should trust this code * Make sure all of the command-line arguments for compiler plugins are passed through to the frontend in the order they were provided * Pass `-load-plugin-library` and `-load-plugin-executable` through to the frontend
@swift-ci please test |
@swift-ci please test Windows |
Corresponding to swiftlang/swift-driver#1377, this adds some default plugin paths for Darwin SDKs and platforms. Fixes rdar://110819604.
Corresponding to swiftlang/swift-driver#1377, this adds some default plugin paths for Darwin SDKs and platforms. Fixes rdar://110819604.
Corresponding to swiftlang/swift-driver#1377, this adds some default plugin paths for Darwin SDKs and platforms. Fixes rdar://110819604.
Corresponding to swiftlang/swift-driver#1377, this adds some default plugin paths for Darwin SDKs and platforms. Fixes rdar://110819604.
No description provided.