Do not forward ARFLAGS (#3763)

This is a partial revert of #3704. It does NOT revert logic that
properly finds the hermetic archiver (binary and associated tests).

cc-rs needs full ownership of flag handling for the archiver. This is in
part due to `ar` having very specific positional flag behaviors, and
partially due to some special logic in how cc-rs constructs static
libraries.

The change to enable `ARFLAGS` was causing many toolchains that pass
flags to the static archiver to error out due to conflicting
expectations for flag handling. Example bad `ar` invocation, where `cq`
is treated as the destination archive instead of the `ar` tool mode:
```
  ar rcsD cq dest.a src1.o src2.o
```
This drops forwarding of `ARFLAGS` to fix the common case.
3 files changed
tree: d0d8bbe938adf135e50aee4d021c09ea8ca4b0b6
  1. .bazelci/
  2. .bcr/
  3. .github/
  4. cargo/
  5. crate_universe/
  6. docs/
  7. examples/
  8. extensions/
  9. ffi/
  10. nix/
  11. rust/
  12. test/
  13. tools/
  14. util/
  15. .bazelignore
  16. .bazelrc
  17. .clang-format
  18. .clippy.toml
  19. .envrc
  20. .gitattributes
  21. .gitignore
  22. .pre-commit-config.yaml
  23. .prettierrc.toml
  24. .rustfmt.toml
  25. .typos.toml
  26. ARCHITECTURE.md
  27. AUTHORS
  28. BUILD.bazel
  29. CODEOWNERS
  30. COMPATIBILITY.md
  31. CONTRIBUTING.md
  32. CONTRIBUTORS
  33. LICENSE.txt
  34. MODULE.bazel
  35. README.md
  36. version.bzl
  37. WORKSPACE.bazel
  38. WORKSPACE.bzlmod
README.md

Rust Rules

  • Postsubmit Build status

Overview

This repository provides rules for building Rust projects with Bazel.

Community

General discussions and announcements take place in the GitHub Discussions, but there are additional places where community members gather to discuss rules_rust.

Documentation

Please refer to the full documentation.