bazelbuild / bazelbuild/rules_cc
Rule-based toolchains add unnecessary include flags to assemble actions
Open
category: toolchains
P3
type: bug
- Dominant language
- Starlark
- Stars
- 247
- Forks
- 196
- PR merge metrics
- No merged PRs in 30d
Description
Old-style toolchains add added include flags in to preprocess_assemble, but not assemble (see [`get_legacy_features`](https://github.com/bazelbuild/rules_cc/blob/0850152/cc/private/toolchain_config/legacy_features.bzl#L53-L64)).
Rule-based toolchains [use `source_compile_actions`](https://github.com/bazelbuild/rules_cc/blob/0850152bab13d8ec609631452e905df46c1495e7/cc/toolchains/args/include_flags/BUILD#L20-L30), which includes both preprocess_assemble and assemble.
This can break toolchains that want to use `as` for assemble and `gcc`/`clang` for preprocess_assemble: it broke `as` from GNU binutils 2.36.1 for me.
Contributor guide
Assessment
This issue has not been assessed yet.