Fix build scripts targeting the wrong architecture (#1564)

* Fix build scripts targeting the wrong architecture

PR #1081 started passing CFLAGS to build scripts, which cargo does
too. But unfortunately Bazel's cpp toolchain adds an explicit target to
the CFLAGS it provides, and that target uses the host platform instead
of the target platform. When building a crate like blake3 or zstd on a
Mac with iOS as the target, this ends up in the crate being built for
macOS instead of iOS.

* Add an end-to-end test to make sure building zstd for iOS works
12 files changed
tree: bf52bec043d1e7a0f691dbceb0ec1094e72e24f7
  1. .bazelci/
  2. .github/
  3. bindgen/
  4. cargo/
  5. crate_universe/
  6. docs/
  7. examples/
  8. proto/
  9. rust/
  10. test/
  11. tools/
  12. util/
  13. wasm_bindgen/
  14. .bazelignore
  15. .bazelrc
  16. .clang-format
  17. .gitignore
  18. ARCHITECTURE.md
  19. AUTHORS
  20. BUILD.bazel
  21. CODEOWNERS
  22. COMPATIBILITY.md
  23. CONTRIBUTING.md
  24. CONTRIBUTORS
  25. LICENSE.txt
  26. README.md
  27. version.bzl
  28. WORKSPACE.bazel
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.