Skip to content

Add shim/README.md to explain what the shim/ tree is for #6860

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

Merged
merged 1 commit into from
Nov 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions shim/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# buck2 shims

The `shim/` subtree helps the Meta-internal buck2 build system also work in the
open-source repo.

Shims are how open-source buck2 supports a [line
like](https://github.com/pytorch/executorch/blob/50aa517549d10324147534d91d04a923b76421d6/kernels/optimized/targets.bzl#L1):

```
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
```

In the open-source repo, `fbsource//xplat` (a Meta-internal root) doesn't exist.
The `shim = shim` line in `../.buckconfig` tells buck2 to look in
[`shim/xplat/executorch/build/runtime_wrapper.bzl`](https://github.com/pytorch/executorch/blob/main/shim/xplat/executorch/build/runtime_wrapper.bzl)
instead.
Loading