Skip to content

Commit 01e3a2c

Browse files
ndmitchellmeta-codesync[bot]
authored andcommitted
Buildscript fixups for aws-lc-rs, zerocopy, oid-registry
Summary: OSS bootstrap build fails on crate build scripts that require runtime resources or Cargo-specific machinery not provided by the Buck build: - aws-lc-rs panics with "missing DEP_AWS_LC_ include" because it depends on aws-lc-sys exporting DEP_AWS_LC_INCLUDE via Cargo's `links` metadata, which Buck does not forward. Skip the build script entirely (matches fbsource third-party/rust). - zerocopy 0.8 panics reading its own Cargo.toml because its build.rs expects CARGO_MANIFEST_DIR to resolve to a directory containing Cargo.toml, which is not how reindeer-generated Buck targets are laid out. Skip the build script entirely (matches fbsource third-party/rust). - oid-registry 0.6 panics with ENOENT because its build.rs calls load_file("assets/oid_db.txt") at runtime. precise_srcs detects files referenced via include!/mod/similar macros but not string-based file reads, so the asset was not materialized into the build-script sandbox. Declare it explicitly via extra_srcs. Reviewed By: JakobDegen, dtolnay Differential Revision: D101252116 fbshipit-source-id: 2096f9a80b0c3d76d3a3a40a64bd5901dea55c3c
1 parent d07de44 commit 01e3a2c

3 files changed

Lines changed: 7 additions & 2 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
buildscript.run = true
1+
buildscript.run = false

shim/third-party/rust/fixups/oid-registry/fixups.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,8 @@ cargo_env = [
1010
"CARGO_PKG_NAME", # Needed by _buck1_handle_manifest_dir
1111
"CARGO_MANIFEST_DIR",
1212
]
13+
14+
# build.rs calls `load_file("assets/oid_db.txt")` at runtime; precise_srcs
15+
# detects macros like `include!` but not string-based file reads, so declare
16+
# the asset explicitly.
17+
extra_srcs = ["assets/oid_db.txt"]

shim/third-party/rust/fixups/zerocopy/fixups.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@
55
# License, Version 2.0 found in the LICENSE-APACHE file in the root directory
66
# of this source tree.
77

8-
buildscript.run = true
8+
buildscript.run = false
99
cargo_env = true

0 commit comments

Comments
 (0)