Skip to content
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

Use DarwinToolchain for apple-none targets #1331

Merged
merged 1 commit into from Apr 25, 2023
Merged

Conversation

rauhul
Copy link
Contributor

@rauhul 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.

Copy link
Contributor

@artemcm artemcm left a 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.

Copy link
Collaborator

@compnerd compnerd left a 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{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
switch self.vendor{
switch self.vendor {

Copy link
Contributor Author

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.

Copy link
Contributor

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.
@artemcm
Copy link
Contributor

artemcm commented Apr 14, 2023

@swift-ci test

@rauhul
Copy link
Contributor Author

rauhul commented Apr 24, 2023

@swift-ci test windows

1 similar comment
@rauhul
Copy link
Contributor Author

rauhul commented Apr 25, 2023

@swift-ci test windows

@rauhul
Copy link
Contributor Author

rauhul commented Apr 25, 2023

@compnerd The windows test is failing with when trying to clone https://github.com/apple/swift-crypto.git any ideas on how to get past this point? Ugh I was looking at a stale run, ignore this for now, sorry for the noise.

@rauhul rauhul merged commit 12b941c into main Apr 25, 2023
3 checks passed
@rauhul rauhul deleted the apple-none-isnt-unix branch April 25, 2023 16:47
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.

None yet

4 participants