| Give the third-party crates a platform to be Android on 0238622 nandi 19d ago | 1 | # The platform names reindeer writes into third-party/rust/BUCK, as |
| 2 | # configurations buck can match. |
| 3 | # |
| 4 | # The `platform` dict on a generated target is keyed by reindeer's own names, |
| 5 | # and the prelude turns a configuration into one of those names through this |
| 6 | # select. Its default list is desktop and Windows and wasm; there is no Android |
| 7 | # row, so an Android configuration resolved to None, `platform.get(None, {})` |
| 8 | # found nothing, and every target-gated dependency was dropped — silently, and |
| 9 | # only visible as the crate failing to compile against the imports it was |
| 10 | # supposed to have. glutin is where it shows first: glutin_egl_sys is not |
| 11 | # optional on Android, and it went missing. |
| 12 | # |
| 13 | # The name here has to be the one in reindeer.toml. Nothing checks that. |
| 14 | load("@prelude//rust:cargo_package.bzl", "DEFAULT_REINDEER_PLATFORMS", "set_reindeer_platforms") |
| 15 | |
| 16 | set_reindeer_platforms(select({ |
| 17 | "DEFAULT": DEFAULT_REINDEER_PLATFORMS, |
| 18 | "prelude//os:android": select({ |
| 19 | "DEFAULT": None, |
| 20 | "prelude//cpu:arm64": "android-arm64", |
| 21 | }), |
| 22 | })) |