-
Notifications
You must be signed in to change notification settings - Fork 197
[Darwin] Add external plugin paths into platform specified by PLATFORM_DIR #1726
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
[Darwin] Add external plugin paths into platform specified by PLATFORM_DIR #1726
Conversation
…M_DIR The driver currently has logic to infer the location of the platform based on the conventional layout of SDKs within platforms. However, that doesn't work well when SDKs have been built up in other places. Introduce support for a second convention, that the PLATFORM_DIR environment variable can specify the path to the platform. When present, also add external plugin paths pointing into that platform. Fixes rdar://138370421.
@swift-ci please test |
// If the PLATFORM_DIR environment variable is set, also add plugin | ||
// paths into it. | ||
if let platformDir = env["PLATFORM_DIR"], | ||
let platformPath = try? VirtualPath(path: platformDir) { | ||
addPluginPaths( | ||
forPlatform: platformPath, | ||
commandLine: &commandLine | ||
) | ||
} |
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 env["PLATFORM_DIR"]
based paths should precedes the SDK path based paths.
If there are plugins with the same name in the both directories, earlier -external-plugin-path
option takes the precedence.
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.
Good point, I've moved it first
Since PLATFORM_DIR is the override, put it before the default-derived path.
@swift-ci please test |
@swift-ci please test Windows |
The driver currently has logic to infer the location of the platform based on the conventional layout of SDKs within platforms. However, that doesn't work well when SDKs have been built up in other places.
Introduce support for a second convention, that the PLATFORM_DIR environment variable can specify the path to the platform. When present, also add external plugin paths pointing into that platform.
Fixes rdar://138370421.