-
Notifications
You must be signed in to change notification settings - Fork 211
Tests: explicitly pass a ld for Darwin targets #947
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
Conversation
047a7f0?w=1 is helpful for viewing the diff. |
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.
Is specifying Darwin targets even valid on windows (or linux)?
This seems fine for now, since there is probably coverage that we wouldn't otherwise get, but I wonder if we need different test cases for other operating systems.
@@ -2891,60 +2927,73 @@ final class SwiftDriverTests: XCTestCase { | |||
} | |||
|
|||
func testTargetVariant() throws { |
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'm not even sure if these tests should be valid outside of macOS, since I think catalyst is the only thing that uses -target-variant
Yes and no. Yes, that is entirely valid thing to do, no you do not expect it to get anywhere. The reason for the latter is that you do not have the platform SDK. That is only available through Xcode. But, assuming that you had the SDK, then this is totally valid to do this on other platforms.
Yes, in general, we should prefer to use the host target and only explicitly specify the target triple when we are testing target specific behaviour rather than general driver behaviour. |
@swift-ci please test |
1 similar comment
@swift-ci please test |
@swift-ci please test |
1 similar comment
@swift-ci please test |
afdb838
to
8a6dc85
Compare
@swift-ci please test |
When testing with explicit Darwin targets, we need to explicitly add the ld path to use for the tests as not all platforms use or have a `ld` executable. Stub out the path to ensure that the tests are able to be executed. Alternatively, we could remove the Darwin specific triples on the test. Additionally, while in the area, add an additional test case for Windows x86_64 LTO and enable the linker profile argument checks for ELFish targets on Windows as well.
@swift-ci please test |
This is based on #946 and transitively on #940. Only the last commit is relevant.