-
Notifications
You must be signed in to change notification settings - Fork 452
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
Set default compiler to clang on apple hosts #407
base: main
Are you sure you want to change the base?
Conversation
This is how one test for the target and host
|
Seems reasonable to me! I'm not sure why CI didn't fire here, but this plus with fixed tests sounds reasonableto me. |
What's the best way to fix the tests? It's not clear to me why the host and target are both set to the same or even why the host is set at all? For one thing, I think you'd want any current or future logic in Would it be acceptable to let the tests assume the actual host instead of the target as the host? |
Okay, I have better understanding of the test infrastructure. Ignore my musings above. I'm currently performing some renovations to the tests. |
Ok thanks for that! I wonder if in the meantime that #408 is a better solution for this? I'm somewhat wary of changing defaults as that can have weird unintended rippling effects, but if we can detect that |
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.
This seems reasonable, if someone wants to use GCC on these targets, they can set CC
or set the compiler via the API, but I think we shouldn't ever default to it on Apple targets.
That said, this needs a rebase, and I'll probably go over it again after that's done.
The change in this PR (615c53b) seems to be the right choice to make.
clang
/clang++
should be considered the default on macOS, and it allows theToolFamily
to be chosen correctly based on the name.Many tests fail, however, and I believe that's because (a) they are duplicated for Linux and macOS targets and (b) each uses the same target and host. For example, consider this test from
tests/test.rs
:So, first, is my premise about choosing the default compiler on macOS is correct? If so, how should the tests change?