-
Notifications
You must be signed in to change notification settings - Fork 45
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
feat: create cc_toolchains for multiple exec platforms #196
Conversation
I know that a valid usecase for this project is using I suggest that the target platform definitions should either be defined inside of e.g. so it's likely best this PR does some minimum further work to generate these platforms somewhere central. |
a4c8d7e
to
7ef93d3
Compare
Thanks for the initial look @linzhp I have addressed the comments made, I have added a |
7ef93d3
to
2f4691b
Compare
I have tested the latest iteration with RE where host was x86 and my remote was arm64, and got successful compilations. I cannot run the full test suite yet as i'm running into a problem with |
@linzhp ping/bump , is there anything else outstanding on this PR you currently want me to address? |
I can take a look sometime this week |
There is some issues with Windows' platform names though |
Let me investigate. Hopefully fixed, I wasn't doing correct substitution for windows/macos for the local repository symlinking logic as I dont have a machine to test those on necessarily. |
b8ad790
to
b3cd108
Compare
Pushed a change that hopefully fixed the failing worksflows, could we try again please? Is there any way for me to run the majority of it locally outside of |
That's the best bet. I think the main problem is the support for different platforms. I just changed the permission so hopefully your updates can automatically trigger CI without my approval. That makes your iteration faster. |
641da30
to
46689dc
Compare
Looks like macos fails for reasons outside my control; see #131 This seems to be because macos isn't allowed to cross-compile the other toolchains that are being registered. For Macos I suppose we need to not register the other platforms, I am unsure the pattern for that. |
09a831d
to
d68999b
Compare
d68999b
to
7286395
Compare
Fixed all failures outside of the releaase checks, I have attempted to change the API for the WORKSPACE file, but it fails on trying to use the released version of @linzhp Can you recommend the correct approach to fixing this? I don't see a way of doing this without breaking the API for In the meantime I'll attempt a refactor that is fully backwards compatible. UPDATE: Added backwards compatibility, was simpler than I thought, I don't usually interact with WORKSPACE files. Hopefully it's in a good state now. Thanks again for you patience while I fight the multiple platform issues. |
7286395
to
0a9d38e
Compare
This change aims to allow hermetic_cc_toolchain to create toolchains for multiple exec platforms. It now generates repositories of the format {exec}-zig_sdk and registers each toolchain to only be exec_compatible_with those specific platform constraints.
0a9d38e
to
86af390
Compare
86af390
to
f55849d
Compare
f55849d
to
856307d
Compare
Thanks for the contribution! |
This change aims to allow hermetic_cc_toolchain to create toolchains for multiple exec platforms. It now generates repositories of the format {exec}-zig_sdk and registers each toolchain to only be exec_compatible_with those specific platform constraints.
I want this PR to be a WIP as we discuss how we want this to look and if you're happy with it's general flow.
This is an attempt at fixing #148
So far I have tested that my local client (mac) can build c code using the toolchains registered on a
x86_64
remote executor and have seen success. It'll will be hard for me to test every combination; but I will be able to local (x86_64) -> remote (arm64) tests as well.