nandi/jolt-nativepublic Fork 0
258bbc5161b93d580a4c84363acabe63b0624e88
Commits
Clone
git clone https://git.rickub.com/nandi/jolt-native.git
git clone ssh://git@rickub.com/nandi/jolt-native.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

BUCK · 43 lines · 1.4 KBPython Blame HistoryRaw
Cross-compile for Android, with an NDK nobody has to install 14a30c0 nandi 19d ago1# The Android toolchain, built.
2#
3# There is no Android graph in this repo yet — the third-party crates have no
4# Android platform in reindeer.toml, so nothing that depends on them can be
5# configured for the device — so these are what keep the toolchain honest in
6# the meantime. One C object, compiled by the NDK's clang against bionic's
7# headers, and one Rust one, compiled against the device's libstd and linked
8# by that same clang. Both configured for the device, neither shipping.
9#
10# just buck build toolchains//selftest:abi-android
11# just buck build toolchains//selftest:std-android
12cxx_library(
13 name = "abi",
14 srcs = ["abi.c"],
15 visibility = ["PUBLIC"],
16)
17
18# The target configuration moves; the execution platform does not. Building
19# `:abi` directly would compile it for the host, where it is meant to fail.
20configured_alias(
21 name = "abi-android",
22 actual = ":abi",
23 platform = "root//platforms:android-arm64",
24 visibility = ["PUBLIC"],
25)
26
27rust_library(
28 name = "std",
29 srcs = ["abi.rs"],
30 crate_root = "abi.rs",
31 edition = "2021",
32 # Shared, so the link runs: a rlib would prove rustc found the target
33 # libstd and nothing about whether the linker can produce a device object.
34 preferred_linkage = "shared",
35 visibility = ["PUBLIC"],
36)
37
38configured_alias(
39 name = "std-android",
40 actual = ":std",
41 platform = "root//platforms:android-arm64",
42 visibility = ["PUBLIC"],
43)