-
Notifications
You must be signed in to change notification settings - Fork 199
Use DarwinToolchain for apple-none targets #1331
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
rauhul
commented
Apr 14, 2023
- When compiling for os none for apple, we should perfer using a Darwin toolchain (maybe a misnomer now) instead of a generic UNIX toolchain. This results in the driver selecting relevant tools for apple platforms, such as using ld64 over gold, etc.
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.
Could you please add a quick test for this?
Have two driver invocations, one for apple
one not, and make sure the corresponding drivers have the expected toolchain.
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.
LGTM with an associated test (as @artemcm already requested).
return GenericUnixToolchain.self | ||
case .wasi: | ||
return WebAssemblyToolchain.self | ||
case .win32: | ||
return WindowsToolchain.self | ||
case .noneOS: | ||
switch self.vendor{ |
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.
switch self.vendor{ | |
switch self.vendor { |
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.
Picked up this diff with the latest commit that adds tests. I used a large list of triples already used in TripleTests, but I'm not sure if this is really the best test structure and I'm happy to change it if you have any ideas.
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 appreciate the thoroughness. It looks good to me, thanks!
- When compiling for os none for apple, we should perfer using a Darwin toolchain (maybe a misnomer now) instead of a generic UNIX toolchain. This results in the driver selecting relevant tools for apple platforms, such as using ld64 over gold, etc.
f3fd0e6
to
446c9b9
Compare
@swift-ci test |
@swift-ci test windows |
1 similar comment
@swift-ci test windows |
|