Skip to content

Expose runner cfg as optional third argument - #101

Open
feeltheburns wants to merge 1 commit into
keith:mainfrom
feeltheburns:main
Open

Expose runner cfg as optional third argument#101
feeltheburns wants to merge 1 commit into
keith:mainfrom
feeltheburns:main

Conversation

@feeltheburns

Copy link
Copy Markdown

When dealing with cross compilation environments, there are cases where it is beneficial to have the runner cfg be "exec" instead of "target".

@keith

keith commented Aug 5, 2026

Copy link
Copy Markdown
Owner

can you share an example of where this needs the exec config?

@feeltheburns

Copy link
Copy Markdown
Author

can you share an example of where this needs the exec config?

Here is the use case:

I have a deploy target that is a multirun, that is called like this (note the arm config points to a arm toolchain:
bazel run --config=arm //:deploy_to_pi

That looks something like this

multrirun(
   name = "deploy_to_pi",
   commands = [
     :deploy_script,
     :verify_deployed_script,
   ]
)

Where deploy_script and verify_deployed_script are sh_binary() targets and at depend on an executable for the pi, which requires the arm cross compilation toolchain. While the shell scripts need to be run on the host "exec" context.

When running without my patch, I get the follow error type as it's trying to use the python interpreter for arm when processing the multirun command.

OSError: [Errno 8] Exec format error

@alextac98

Copy link
Copy Markdown

This would be a useful feature when you use bazel as a build orchestrator and a run orchestrator, which it should be able to handle. Excited to see this in main if it works with the vision of the maintainer, I currently apply this patch to the module for my projects

@keith

keith commented Aug 18, 2026

Copy link
Copy Markdown
Owner

can you fix the ci job, and add a quick test for this that transitions the multirun to some weirdo platform and proves that it still works?

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

Successfully merging this pull request may close these issues.

3 participants