-
Notifications
You must be signed in to change notification settings - Fork 199
[Macros on Darwin] Use device platform paths when building for the simulator #1400
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
[Macros on Darwin] Use device platform paths when building for the simulator #1400
Conversation
…mulator To avoid having duplicated macro implementations in both the device and simulator platforms, when building for a simulator platform, pass `-external-plugin-path` that points into the *device* platform. There is no need to have macro implementations in the simulator platforms. Implements rdar://112563633
@swift-ci please test |
let pluginBIndex = job.commandLine.firstIndex(of: .path(VirtualPath.relative(.init("PluginB#Bexe")))) | ||
let pluginBIndex = job.commandLine.firstIndex(of: .path(VirtualPath.relative(.init("Plugin~B#Bexe")))) |
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.
IIUC we're only shell escaping the SDK paths, not the ones that were already passed in. Could we just rename PlatformChecks
to eg. Platform Checks
?
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.
Sure, that's a good idea.
|
||
func pluginPathTest(platform: String, searchPlatform: String) throws { | ||
let sdkRoot = testInputsPath.appending( | ||
components: ["PlatformChecks", "\(platform).platform", "Developer", "SDKs", "\(platform).sdk"]) |
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.
Doesn't the SDK name normally contain the version?
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.
It does. That shouldn't matter, but just in case... I'll update it.
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.
Agreed, there's no where that matters currently but... 🤷
... to make sure we're not missing any odd corner cases here.
@swift-ci please test |
@swift-ci please test Windows |
To avoid having duplicated macro implementations in both the device and
simulator platforms, when building for a simulator platform, pass
-external-plugin-path
that points into the device platform. Thereis no need to have macro implementations in the simulator platforms.
Implements rdar://112563633