Toolchain having an attribute which should be cfg=target

64 views
Skip to first unread message

Ian O'Connell

unread,
Jul 29, 2019, 12:22:25 AM7/29/19
to bazel-discuss
Is it possible to mark an attribute of a toolchain to be a set of target dependencies rather than becoming for the host platform?

For protobuf scala code gen in the rules scala we have the issue:

Toolchain is described @

if i put a local java library as a dependency to the toolchain it does seem to be under the host path as a host dependency.

This does seem to also be what the java grpc rules do too

type approach (adding or not the cfg="target" doesn't seem to make any effect which is in line with the docs). Though the scala rules are aspect based if that makes any difference. 

Is there toolchain incantation i'm missing here(or just done something silly?)? I need users to be able to specify dependencies for all targets generated by the scalapb rule though on the target platform. 

Thanks,

Ian.

John Cater

unread,
Jul 29, 2019, 11:31:21 AM7/29/19
to Ian O'Connell, bazel-discuss
This is absolutely something that is needed. I've written a design doc related to it: https://github.com/bazelbuild/proposals/blob/master/designs/2019-02-12-toolchain-transitions.md

Unfortunately, the work is slower than I had hoped. Currently, I am trying to get the execution transition to work (see https://github.com/bazelbuild/bazel/issues/7935), but that keeps finding new and exciting bugs in the way bazel handles host/exec dependencies.

Getting the toolchain transition ready, so that toolchains can properly build dependencies for the ultimate target config, is definitely still a priority.

John C

--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/CAP_RQpikm-6q0HTEQ%3DhhGXEC0t44X56F2vesP-KfZmd4fyzVaQ%40mail.gmail.com.

Ian O'Connell

unread,
Jul 29, 2019, 4:40:12 PM7/29/19
to John Cater, bazel-discuss
Ah thanks for the details John, the host/target execution stuff does look quite complex. This looks complex enough that i think we probably should try unwind the deps part in these proto rules for now.

Good luck getting this over the line, looks like a huge lift!

Thanks,

Ian.
Reply all
Reply to author
Forward
0 new messages