-
Notifications
You must be signed in to change notification settings - Fork 87
[native_toolchain_c] Fix clang compiler search + tools when using swiftly
#2800
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
base: main
Are you sure you want to change the base?
Conversation
Swiftly proxies commands to some of the tools that ship with Swift distributions, including: `clang`, `ld.lld`, and other tools. Therefore, such tools are symlinks to `swiftly`, and running `swiftly` directly would therefore not work when bundling assets. This PR adds support for using `package:native_toolchain_c` on macOS with Swiftly installed, defaulting to the user's default installation of `ar` and `ld` where applicable.
swiftly
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.
Thanks @nikeokoronkwo !
It would require some additions to current tool resolving and behavior, so I was considering it on a separate PR than this one.
👍
If it is possible to have swiftly on the CI here in GitHub, you could consider adding an extra github workflow that covers it. We also run the CI an extra time in .github/workflows/native_toolchain_c.yaml to cover a different toolchain than the default ones.
And also, please add some tests that tools don't resolve at all on Linux/Windows.
(And version + changelog entry so I can hit publish after merging 😄)
PR HealthLicense Headers ✔️
All source files should start with a license header. Unrelated files missing license headers
This check can be disabled by tagging the PR with API leaks ✔️The following packages contain symbols visible in the public API, but not exported by the library. Export these symbols or remove them from your publicly visible API.
This check can be disabled by tagging the PR with Breaking changes ✔️
This check can be disabled by tagging the PR with Changelog Entry ✔️
Changes to files need to be accounted for in their respective changelogs. This check can be disabled by tagging the PR with |
Fixes #2792
Swiftly proxies commands to some of the tools that ship with Swift distributions, including:
clang,ld.lld, and other tools. Therefore, such tools are symlinks toswiftly, and runningswiftlydirectly would therefore not work when bundling assets.This PR adds support for using
package:native_toolchain_con macOS with Swiftly installed, defaulting to the user's default installation ofarandldwhere applicable.I assume that in realistic use-cases, users would want to use specific toolchains and therefore, would want to use tools together rather than distinct instances of certain tools (i.e. prefer
ldbundled with the currently resolvedclangthan a separate use ofld), and most users would prefer using the Clang distribution they already have in their system rather than that bundled with Swiftly, so I'm considering a separate PR for using a different clang toolchain than that Swiftly has. It would require some additions to current tool resolving and behavior, so I was considering it on a separate PR than this one.