Skip to content

Exclude assemble actions from include/random-seed cc_args - #864

Open
dcavalei wants to merge 2 commits into
bazelbuild:mainfrom
dcavalei:fix/random-seed-assembly-actions
Open

Exclude assemble actions from include/random-seed cc_args#864
dcavalei wants to merge 2 commits into
bazelbuild:mainfrom
dcavalei:fix/random-seed-assembly-actions

Conversation

@dcavalei

@dcavalei dcavalei commented Sep 2, 2026

Copy link
Copy Markdown

-frandom-seed has no effect on assembly and causes Clang to warn with -Wunused-command-line-argument when assembling .s files.

Related to #698

@dcavalei
dcavalei marked this pull request as ready for review September 2, 2026 14:20
@dcavalei
dcavalei requested a review from trybka as a code owner September 2, 2026 14:20
Copilot AI lite review requested due to automatic review settings September 2, 2026 14:20

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The updated action scope also drops objc_compile, which appears to go beyond the stated intent and should be reconciled (code vs. PR description).

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Scopes the random_seed toolchain argument so -frandom-seed={output_file} is no longer applied to assembly actions, avoiding Clang -Wunused-command-line-argument warnings when assembling .s files (related to #698).

Changes:

  • Narrow random_seed argument application from compile_actions to just C/C++ compile action sets.
File summaries
File Description
cc/toolchains/args/random_seed/BUILD Narrows the random_seed cc_args action scope to avoid passing -frandom-seed to assembly actions.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +14 to +17
actions = [
"//cc/toolchains/actions:c_compile_actions",
"//cc/toolchains/actions:cpp_compile_actions",
],

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

-frandom-seed has no effect on assembly and causes Clang to warn with
-Wunused-command-line-argument when assembling .s files. Objective-C
compilation is kept in scope since it goes through the same
deterministic-hash codegen as C/C++.

Related to bazelbuild#698
@dcavalei
dcavalei force-pushed the fix/random-seed-assembly-actions branch from e17c0a3 to 6883ab2 Compare September 2, 2026 14:27
@dcavalei
dcavalei marked this pull request as draft September 2, 2026 15:00
@dcavalei

dcavalei commented Sep 2, 2026

Copy link
Copy Markdown
Author

I've found a few more things that can be fixed, so I am converting this back to draft. I will bundle a few fixes first.

assemble compiles already-preprocessed assembly, so include-path
flags are unused there.

Relates to bazelbuild#698
@dcavalei
dcavalei force-pushed the fix/random-seed-assembly-actions branch from 353fa32 to 24eafec Compare September 2, 2026 16:38
@dcavalei dcavalei changed the title Scope random_seed args to compile actions only, not assembly Exclude assemble actions from include/random-seed cc_args Sep 3, 2026
@dcavalei
dcavalei marked this pull request as ready for review September 3, 2026 08:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants