-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert D66561332: Rewrite TARGETS files to BUCK files for facebook/sa…
…pling Differential Revision: D66561332 Original commit changeset: 47d3c0a9efe7 Original Phabricator Diff: D66561332 fbshipit-source-id: 8ad0c9c3d4803fa82cf719f81fdb2ab052547a56
- Loading branch information
1 parent
9ae37ca
commit fb8b8a5
Showing
1 changed file
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library") | ||
load("@fbcode_macros//build_defs:rust_binary.bzl", "rust_binary") | ||
load("@fbcode_macros//build_defs:rust_library.bzl", "rust_library") | ||
|
||
oncall("autocargo") | ||
|
||
rust_library( | ||
name = "hostcaps", | ||
srcs = glob(["src/**/*.rs"]), | ||
autocargo = { | ||
"cargo_toml_config": { | ||
"lints": { | ||
"rust": { | ||
"unexpected_cfgs": { | ||
"check-cfg": ["cfg(fbcode_build)"], | ||
"level": "warn", | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
crate_root = "src/lib.rs", | ||
deps = [ | ||
"fbsource//third-party/rust:derive_more", | ||
"fbsource//third-party/rust:once_cell", | ||
"//common/rust/fbwhoami:fbwhoami", | ||
], | ||
) | ||
|
||
cpp_library( | ||
name = "hostcaps_ffi", | ||
headers = ["hostcaps.h"], | ||
exported_deps = [ | ||
":hostcaps", | ||
], | ||
) | ||
|
||
rust_binary( | ||
name = "test-hostcaps", | ||
srcs = ["src/bin/test.rs"], | ||
crate_root = "src/bin/test.rs", | ||
deps = [":hostcaps"], | ||
) |