Skip to content

Conversation

@ian-twilightcoder
Copy link

The search path prefix is really a property of the SDK, and not the target triple. The target is just being used as a proxy for the SDK. That's problematic when the SDK being used doesn't match the target assumption, and the prefix should be taken from the SDK rather than hard coded.

Parse the SupportedTargets, which is what holds the platform prefix, in DarwinSDKInfo. SupportedTargets contains an entry for the SDK's canonical name, and that entry holds a valid OS value so use that instead of the hard coded map. Include the environment which is also relevant in some situations, and the vendor and object format in case they're useful later. Skip architectures because they typically aren't used for doing platform matching.

rdar://165414248

@ian-twilightcoder
Copy link
Author

@swift-ci test

@ian-twilightcoder
Copy link
Author

Looks like this will need to go in with swiftlang/swift#86309 to not break some of their tests.

…SDK, not the target

The search path prefix is really a property of the SDK, and not the target triple. The target is just being used as a proxy for the SDK. That's problematic when the SDK being used doesn't match the target assumption, and the prefix should be taken from the SDK rather than hard coded.

Parse the SupportedTargets, which is what holds the platform prefix, in DarwinSDKInfo. SupportedTargets contains an entry for the SDK's canonical name, and that entry holds a valid OS value so use that instead of the hard coded map. Include the environment which is also relevant in some situations, and the vendor and object format in case they're useful later. Skip architectures because they typically aren't used for doing platform matching.

rdar://165414248
@ian-twilightcoder
Copy link
Author

@swift-ci test llvm

@ian-twilightcoder
Copy link
Author

@swift-ci test

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.

1 participant