Skip to content

Conversation

@rupprecht
Copy link

Since clang 20 (llvm/llvm-project@1efcc53), clang will report a warning that options like -c are unused when using -fsyntax-only. This leads to a lot of spam when running the parse headers action:

INFO: From Compiling libc/hdr/types/clock_t.h:
clang-21: warning: argument unused during compilation: '-c' [-Wunused-command-line-argument]

To avoid using -c with -fsyntax-only, remove the header parsing action from the compiler_input_flags feature, and having the header parsing action itself expand %{source_file} so it can do so w/o the -c.

@rupprecht
Copy link
Author

For a real life example, see the log spam from this action: https://github.com/llvm/llvm-project/actions/runs/21224101850/job/61066339769.

@keith
Copy link
Member

keith commented Jan 21, 2026

#531

rupprecht added a commit to llvm/llvm-project that referenced this pull request Jan 21, 2026
…177246)

Running bazel CI is full of warnings like this:
```
INFO: From Compiling libc/hdr/types/clock_t.h:
clang-21: warning: argument unused during compilation: '-c' [-Wunused-command-line-argument]
```
bazelbuild/rules_cc#573 is a possible fix in
bazel itself. Until then, just use a copt to ignore it.
@rupprecht
Copy link
Author

#531

Nice, that would fix it too.

llvm-sync bot pushed a commit to arm/arm-toolchain that referenced this pull request Jan 21, 2026
…er parsing (#177246)

Running bazel CI is full of warnings like this:
```
INFO: From Compiling libc/hdr/types/clock_t.h:
clang-21: warning: argument unused during compilation: '-c' [-Wunused-command-line-argument]
```
bazelbuild/rules_cc#573 is a possible fix in
bazel itself. Until then, just use a copt to ignore it.
Harrish92 pushed a commit to Harrish92/llvm-project that referenced this pull request Jan 23, 2026
…lvm#177246)

Running bazel CI is full of warnings like this:
```
INFO: From Compiling libc/hdr/types/clock_t.h:
clang-21: warning: argument unused during compilation: '-c' [-Wunused-command-line-argument]
```
bazelbuild/rules_cc#573 is a possible fix in
bazel itself. Until then, just use a copt to ignore it.
Harrish92 pushed a commit to Harrish92/llvm-project that referenced this pull request Jan 24, 2026
…lvm#177246)

Running bazel CI is full of warnings like this:
```
INFO: From Compiling libc/hdr/types/clock_t.h:
clang-21: warning: argument unused during compilation: '-c' [-Wunused-command-line-argument]
```
bazelbuild/rules_cc#573 is a possible fix in
bazel itself. Until then, just use a copt to ignore it.
HugoSilvaSantos pushed a commit to HugoSilvaSantos/arm-toolchain that referenced this pull request Jan 27, 2026
…(#177246)

Running bazel CI is full of warnings like this:
```
INFO: From Compiling libc/hdr/types/clock_t.h:
clang-21: warning: argument unused during compilation: '-c' [-Wunused-command-line-argument]
```
bazelbuild/rules_cc#573 is a possible fix in
bazel itself. Until then, just use a copt to ignore it.
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