Docs for `cc_test` should mention that the `linkstatic` default is different on macOS
- Dominant language
- Java
- Stars
- 25.8k
- Forks
- 4.6k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 75
Description
### Description of the bug:
The [docs for `linkstatic`](https://bazel.build/reference/be/c-cpp#cc_test.linkstatic) say that the default is `linkstatic = False` for `cc_test` targets. This isn't true on macOS because the osx toolchain does not provide a `supports_dynamic_linker` feature, which is required for `linkstatic = False` support. See https://github.com/bazelbuild/bazel/commit/ec5553352f2f661d39ac4cf665dd9b3c779e614c and https://github.com/bazelbuild/bazel/issues/4341#issuecomment-758028203 for background.
### What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
n/a, docs bug
### Which operating system are you running Bazel on?
macOS
### What is the output of `bazel info release`?
release 5.2.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?
https://github.com/bazelbuild/bazel/commit/ec5553352f2f661d39ac4cf665dd9b3c779e614c
https://github.com/bazelbuild/bazel/issues/4341#issuecomment-758028203
https://bazelbuild.slack.com/archives/CGA9QFQ8H/p1665782748672499
### Any other information, logs, or outputs that you want to share?
_No response_
Contributor guide
Research direction
Start with the linked Bazel `cc_test.linkstatic` documentation and review the referenced commit and issue comment for the platform-specific behavior. Update the documentation to state that macOS has a different default, and consider the change done when the documented default matches the actual macOS toolchain behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, macos
- Domain
- build-system, documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 50/100