Set `copt` for internal tools like `make` and `pkgconfig`
Please add some way to pass compiler flags for building the rules_foreign_cc internal tools.
We want to build our own code base with -Werror but we don't have a way to disable warnings for those external tool we don't have control over.
rules_foreign_cc could definitely expose some starlark flags for this type of thing. I think using --host_copt does apply to some of these now, but that might be too wide for what you want. You could also patch in the flags until this is resolved:
https://github.com/bazel-contrib/rules_foreign_cc/blob/be14ccaec581826e7eef97277ffde05cc0d8d868/foreign_cc/built_tools/make_build.bzl#L101-L101
@keith Thanks for the code hint. Although I explicitly want to enable -Werror also for --host_copt to build all of our own tools with -Werror as well.
PRs would be welcome in this area but this isn't something that I'll have bandwidth to get to doing anytime in the near future.
It appears that it might be possible to do it via --repo_env=BAZEL_CONLYOPTS=-Werror , but that might not be what you want globally.