-
-
Notifications
You must be signed in to change notification settings - Fork 223
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
Allow user provided platform constraints #371
Conversation
839f400
to
f445a01
Compare
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 for picking this up, looks pretty good overall already.
Could you add a test usage of these new attributes to https://github.com/bazel-contrib/toolchains_llvm/blob/master/tests/MODULE.bazel? You could add synthetic |
I've added a test, the only issue I think is that it causes another llvm toolchain to be downloaded and extracted (or just extracted if there's a repository cache), so up to you if you think it's worth the extra CI time. |
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.
Nice test!
@jkurland-roku I fixed the reference to the host platform, but tests are still failing |
Looks like the ubuntu failures are when bzlmod is disabled which makes sense and I'll look to fix that. The macos failures might be to do with the cxxflags, maybe there's another mechanism to detect which toolchain was selected |
Head branch was pushed to by a user without write access
I think those changes should fix both issues (although not sure about macos, I don't really know anything about macos). I've tested with bzlmod disabled so at least that should work |
8fe5e8e
to
55ac2d3
Compare
So I think the issue is that on the platforms which only support up to llvm 13.0.0 the c++20 toolchain fails to build. So I'm thinking that maybe I get rid of the current c++20 check and instead make a new platform for zlib supporting linker (a better name would be helpful) and then switch to llvm 13 automatically based on that. So replacing the "extra_toolchain" arg in the CI with "--host_platform=@//:archlinux_docker" for example. What do you think? |
That's one approach. You could also try to disable the test for these platforms. Generic starlark changes that work on two common platforms are very unlikely to break on untested platforms. |
I've made this test manual and now only run it when the toolchain isn't overriden |
…d and support workspace
…tform transition rule
…erent tests, add host_platform repo in non bzlmod tests
cee2d4f
to
659db85
Compare
Thanks for carrying this through! |
No worries, thanks for the help |
An implementation of the fix suggested in #361 to allow users to specify additional platform constraints for each toolchain.
My personal use case was building some targets with musl and the toolchains here were interferring.