Skip to content
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

User provided platform constraints #361

Open
nickjmeyer opened this issue Jul 29, 2024 · 3 comments
Open

User provided platform constraints #361

nickjmeyer opened this issue Jul 29, 2024 · 3 comments

Comments

@nickjmeyer
Copy link

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?

@fmeum
Copy link
Member

fmeum commented Aug 5, 2024

This could be wired up in a similar way to target_settings defined here:

"target_settings": attr.string_list_dict(

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:

"toolchain_root": tag_class(
attrs = {
"name": attr.string(doc = "Same name as the toolchain tag.", default = "llvm_toolchain"),
"targets": attr.string_list(doc = "Specific targets, if any; empty list means this applies to all."),
"label": attr.label(doc = "Dummy label whose package path is the toolchain root package."),
"path": attr.string(doc = "Absolute path to the toolchain root."),
},
),

@jkurland-roku
Copy link
Contributor

jkurland-roku commented Aug 9, 2024

I've opened an MR with an implementation of this here (#371).

@nickjmeyer
Copy link
Author

Thanks for the pointers!

fmeum pushed a commit that referenced this issue Sep 6, 2024
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants