I'm working on a bazel project which uses many tools that are built within bazel as inputs to the execution of actions. Since these tools are built in an 'exec' configuration they depend on libraries which are built in the same 'exec' configuration and in addition I end up building the libraries in the 'target' configuration (as that is what I'm trying to validate builds). In my normal case these two configurations are both my host machine where bazel is running. In this scenario I would like to be able to avoid building all these libraries twice, but I cannot seem to figure out how to do that. When trying to figure out if I could make the configurations match exactly it seems that I couldn't because there is the 'build option': //command_line_option:is exec configuration which is different across the two.
Is this possible by approaching the problem in a different way or do I just have to deal with compiling all my code twice?