Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rust_* is broken: Pigweed's Usage of Clang Breaks rust_library usage #90

Open
michael-christen opened this issue Aug 17, 2024 · 2 comments

Comments

@michael-christen
Copy link
Owner

michael-christen commented Aug 17, 2024

We need to use pigweed's rust toolchain to match, but I've been able to get that working.

In the meantime, we've disabled rust_ targets.

See bsodmike/pigweed-sense-playground#2 for a quick reproduction example.

Related to #28 and f0rmiga/gcc-toolchain#85

@michael-christen
Copy link
Owner Author

May want to switch to rust 0.45.1 instead of 0.48.0 as well

michael-christen added a commit that referenced this issue Aug 18, 2024
###Large Changes
- hermetic C++ compilation with clang toolchain
  - had to remove a few gcc specific copts
- commented out rust targets see #90
- Updates bazel from 7.2.1 to a specific commit of 8.0.0-pre

### Miscellaneous Changes
- Updated .bazelignore to ignore bazel-bin, bazel-out, bazel-testlogs
- add `-diff` to `.gitattributes` for our big lock files so when diffing
we
  just see it as a "binary" and don't make `git diff` unintelligible
- Fixed location of try-import in .bazelrc (should always be last)

NOTE: You can add `per_file_copts` with `--per_file_copt`, for example
to
ignore warnings in `third_party` code

### Followup
- add support for stm32 and rp platforms

### Related Issues:
- #90
- #91
@michael-christen
Copy link
Owner Author

michael-christen commented Sep 5, 2024

A little update:

Asked in pigweed's discord

Prompted

OK, think i understand the issue here (<@735543097500368928> can double check). Bzlmod scopes repository look so while your WORKSPACE file pulls in @rust_toolchain_host_macos_aarch64 that is not in the same scope as @pigweed. I think we need to blzmod-ify the rust toolchain definitions.

Pigweed POC: Progress: I've got a proof of concept working in upstream: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/231689

rules_rust approaches:

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

No branches or pull requests

1 participant