`aquery` of `CppLink` outputs extraneous param file path
- Dominant language
- Java
- Stars
- 25.8k
- Forks
- 4.6k
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 72
Description
### Description of the bug:
In `aquery` outputs, by default command line arguments are expanded, but for `CppLink` action, the result contains both the expanded arguments and the param file path.
### What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
foo.cc
```cpp
int main() { return 0; }
```
BUILD
```
cc_binary(
name='foo',
srcs=['foo.cc']
)
```
Run:
```
bazel aquery --output=text 'mnemonic(CppLink, //:foo)'
```
```
action 'Linking foo'
Mnemonic: CppLink
Target: //:foo
Configuration: darwin-fastbuild
Execution platform: @local_config_platform//:host
ActionKey: 3b8a3654f4da51780786de7e6765419b258a366ceaf520aedcd03ac382f7366a
Inputs: [bazel-out/darwin-fastbuild/bin/_objs/foo/foo.o, bazel-out/darwin-fastbuild/bin/foo-2.params, external/local_config_cc/cc_wrapper.sh, external/local_config_cc/libtool, external/local_config_cc/libtool_check_unique, external/local_config_cc/make_hashed_objlist.py, external/local_config_cc/wrapped_clang, external/local_config_cc/wrapped_clang_pp, external/local_config_cc/xcrunwrapper.sh]
Outputs: [bazel-out/darwin-fastbuild/bin/foo]
ExecutionInfo: {requires-darwin: '', supports-xcode-requirements-set: ''}
Command Line: (exec external/local_config_cc/cc_wrapper.sh \
-lc++ \
-fobjc-link-runtime \
-Wl,-S \
-o \
bazel-out/darwin-fastbuild/bin/foo \
bazel-out/darwin-fastbuild/bin/_objs/foo/foo.o \
-headerpad_max_install_names \
-no-canonical-prefixes \
-target \
x86_64-apple-macosx12.3 \
-Xlinker \
-no_deduplicate \
-lc++ \
-target \
x86_64-apple-macosx12.3 \
@bazel-out/darwin-fastbuild/bin/foo-2.params)
# Configuration: a42135a42aad3da7e3af209ce54745fb0d0306dc29e1f3dc84d7d58372421fc9
# Execution platform: @local_config_platform//:host
ExecutionInfo: {requires-darwin: '', supports-xcode-requirements-set: ''}
```
The command line arguments from the param file are already expanded, but there is still a `@bazel-out/darwin-fastbuild/bin/foo-2.params` argument at the end.
This doesn't reproduce for param files created by Starlark rules.
### Which operating system are you running Bazel on?
macOS and Linux
### What is the output of `bazel info release`?
release 6.0.0
### If `bazel info release` returns `development version` or `(@non-git)`, tell us how you built Bazel.
_No response_
### What's the output of `git remote get-url origin; git rev-parse master; git rev-parse HEAD` ?
_No response_
### Have you found anything relevant by searching the web?
_No response_
### Any other information, logs, or outputs that you want to share?
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.