Skip to content

Commit

Permalink
rust: run libc build script (#4336)
Browse files Browse the repository at this point in the history
Summary:
When setting up the transitive dep on `libc` in #4316, I had originally
passed `--cfg=libc_align`, because that fixed the build for me and on
CI, and I couldn’t figure out the right cross-platform fix. But @faern
[helpfully points out that we just need to run the build script][1],
which detects the OS and Rust compiler version to determine the
appropriate flags. Bazel `rules_rust` can handle this, if we just ask.

(I should have followed my own `DEVELOPMENT.md` suggestions!)

[1]: rust-lang/socket2#130 (comment)

Test Plan:
It still builds—`bazel build @raze__libc__0_2_80//:libc`—and the demo
server still works and accepts requests following #4318’s test plan.

wchargin-branch: rust-libc-gen-buildrs
  • Loading branch information
wchargin authored Nov 17, 2020
1 parent 35171dc commit 2824075
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 6 deletions.
4 changes: 1 addition & 3 deletions tensorboard/data/server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,7 @@ targets = [
gen_buildrs = true

[package.metadata.raze.crates.libc.'0.2.80']
additional_flags = [
"--cfg=libc_align",
]
gen_buildrs = true

[package.metadata.raze.crates.indexmap.'1.6.0']
additional_flags = [
Expand Down
34 changes: 31 additions & 3 deletions third_party/rust/remote/BUILD.libc-0.2.80.bazel

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2824075

Please sign in to comment.