bazel-toolchains
bazel-toolchains copied to clipboard
Allow setting platform constraints with --exec_constraints
By default, clang is detected for cpp configs. While --cpp_env_json can be used to override the default environment variables during toolchain generation, there isn't a way to override platform constraints.
This PR adds flag --exec_constraints which accept a comma separated list of constraint values e.g. --exec_constraints=@bazel_tools//platforms:linux,@bazel_tools//platforms:x86_64,@bazel_tools//tools/cpp:gcc to override the default values.
I would be delighted to have this feature.
I have rebased the PR. Please review and let me know whether it's feasible to merge!