Skip to content

Commit 893c99c

Browse files
committed
Add shim/README.md to explain what the shim/ tree is for
It's not obvious why this tree is here. Add a README explaining it.
1 parent f01b20b commit 893c99c

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

shim/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# buck2 shims
2+
3+
The `shim/` subtree helps the Meta-internal buck2 build system also work in the
4+
open-source repo.
5+
6+
Shims are how open-source buck2 supports a [line
7+
like](https://github.com/pytorch/executorch/blob/50aa517549d10324147534d91d04a923b76421d6/kernels/optimized/targets.bzl#L1):
8+
9+
```
10+
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
11+
```
12+
13+
In the open-source repo, `fbsource//xplat` (a Meta-internal root) doesn't exist.
14+
The `shim = shim` line in `../.buckconfig` tells buck2 to look in
15+
[`shim/xplat/executorch/build/runtime_wrapper.bzl`](https://github.com/pytorch/executorch/blob/main/shim/xplat/executorch/build/runtime_wrapper.bzl)
16+
instead.

0 commit comments

Comments
 (0)