You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Rule-based toolchains add unnecessary include flags to assemble actions #698
P3We're not considering working on this, but happy to review a PR. (No assignee)category: toolchainstype: bugSomething that should be working isn't working
I did have an internal change that passed CI with GNU as, but as soon as I noticed this issue, I rolled back to using gcc for assemble actions and didn't investigate further.
I'm replacing our existing toolchains with rules-based toolchains and I want to minimize the risk of breaking something that isn't caught by CI. Using as seemed too risky with the current behavior.
Whoops, I spoke too soon. This did indeed break CI with GNU as. Rolling back to using gcc for assemble actions was necessary. Updated the ticket description.
Outside of the ability to call an as tool directly through the build, is there anything specific to be gained here? I'd say you're right from a correctness perspective, but the side effect is that if we restore this .s and .S files will be handled differently in ways that are quite subtle.
What's your motivation for trying to use as directly instead of doing assembly through the gcc/clang frontends?
My motivation is to have unsurprising behavior: building .s with the assembler and .S with the compiler frontend is what most people expect. I'm also trying to minimize arg churn as I move us to our new rules-based toolchains. That said, using gcc for assemble isn't the end of the world for us.
I will note that you have the subtile differences in behavior right now: Bazel behaves differently depending on what API the toolchain is defined with.
P3We're not considering working on this, but happy to review a PR. (No assignee)category: toolchainstype: bugSomething that should be working isn't working
Activity
keith commentedon Apr 21, 2026
I've noticed this too but haven't seen issues with clang. Have you tried it with an assmbler where it does end up failing?
davidbalbert commentedon Apr 21, 2026
I did have an internal change that passed CI with GNU as, but as soon as I noticed this issue, I rolled back to using gcc for assemble actions and didn't investigate further.
I'm replacing our existing toolchains with rules-based toolchains and I want to minimize the risk of breaking something that isn't caught by CI. Using
asseemed too risky with the current behavior.davidbalbert commentedon Apr 21, 2026
Whoops, I spoke too soon. This did indeed break CI with GNU as. Rolling back to using gcc for assemble actions was necessary. Updated the ticket description.
davidbalbert commentedon Apr 21, 2026
Apologies for multi-posting.
When I was attempting to move to
as, I noticed thatcompile_actionsis defined like this:It would be nice to either add a new set, or (even better, if possible) modify this one to contain
preprocess_assemblyrather thanassembly_actions.Most of my
cc_argsadd include paths, and needed to ignoreassemble. I ended up defining my own set to deal with this.armandomontanez commentedon Apr 21, 2026
Outside of the ability to call an
astool directly through the build, is there anything specific to be gained here? I'd say you're right from a correctness perspective, but the side effect is that if we restore this.sand.Sfiles will be handled differently in ways that are quite subtle.What's your motivation for trying to use
asdirectly instead of doing assembly through the gcc/clang frontends?davidbalbert commentedon Apr 21, 2026
My motivation is to have unsurprising behavior: building .s with the assembler and .S with the compiler frontend is what most people expect. I'm also trying to minimize arg churn as I move us to our new rules-based toolchains. That said, using
gccforassembleisn't the end of the world for us.I will note that you have the subtile differences in behavior right now: Bazel behaves differently depending on what API the toolchain is defined with.
armandomontanez commentedon Apr 24, 2026
Yes, I have no objections to addressing this, I just wanted to make sure this wasn't blocking use cases I was unaware of.
davidbalbert commentedon Apr 28, 2026
👍 yup, makes sense. thanks for being willing to consider!
Scope random_seed args to compile actions only, not assembly
Exclude assemble action from include-path flags
Exclude assemble action from include-path flags