xref: /aosp_15_r20/external/executorch/shim/README.md (revision 523fa7a60841cd1ecfb9cc4201f1ca8b03ed023a)
1*523fa7a6SAndroid Build Coastguard Worker# buck2 shims
2*523fa7a6SAndroid Build Coastguard Worker
3*523fa7a6SAndroid Build Coastguard WorkerThe `shim/` subtree helps the Meta-internal buck2 build system also work in the
4*523fa7a6SAndroid Build Coastguard Workeropen-source repo.
5*523fa7a6SAndroid Build Coastguard Worker
6*523fa7a6SAndroid Build Coastguard WorkerShims are how open-source buck2 supports a [line
7*523fa7a6SAndroid Build Coastguard Workerlike](https://github.com/pytorch/executorch/blob/50aa517549d10324147534d91d04a923b76421d6/kernels/optimized/targets.bzl#L1):
8*523fa7a6SAndroid Build Coastguard Worker
9*523fa7a6SAndroid Build Coastguard Worker```
10*523fa7a6SAndroid Build Coastguard Workerload("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
11*523fa7a6SAndroid Build Coastguard Worker```
12*523fa7a6SAndroid Build Coastguard Worker
13*523fa7a6SAndroid Build Coastguard WorkerIn the open-source repo, `fbsource//xplat` (a Meta-internal root) doesn't exist.
14*523fa7a6SAndroid Build Coastguard WorkerThe `shim = shim` line in `../.buckconfig` tells buck2 to look in
15*523fa7a6SAndroid Build Coastguard Worker[`shim/xplat/executorch/build/runtime_wrapper.bzl`](https://github.com/pytorch/executorch/blob/main/shim/xplat/executorch/build/runtime_wrapper.bzl)
16*523fa7a6SAndroid Build Coastguard Workerinstead.
17