User provided platform constraints
Hello,
Using this repo, I currently have a tool chain set up to build for target Linux x86_64 and Linux aarch64 all on a host Linux x86_64 machine. I have a third platform I need to support that is another Linux aarch64 target. Is there a way to provide additional platform constraints to enable defining multiple platforms with the same target arch / os? From reading through the repository, it appears not given the exec_compatible_with attribute is set to only specify os and arch.
If not supported, any code pointers as to how you'd extend it to do so?
This could be wired up in a similar way to target_settings defined here:
https://github.com/bazel-contrib/toolchains_llvm/blob/e3c57fc322e684daa656444cbc01435fa0884707/toolchain/internal/repo.bzl#L240
The LLVM extension could receive new tag_classes for, say, extra_target_compatible_with and extra_exec_compatible_with that are similar to the ones defined here (just taking an attr.label_list instead of an attr.label:
https://github.com/bazel-contrib/toolchains_llvm/blob/e3c57fc322e684daa656444cbc01435fa0884707/toolchain/extensions/llvm.bzl#L82-L89
I've opened an MR with an implementation of this here (https://github.com/bazel-contrib/toolchains_llvm/pull/371).
Thanks for the pointers!