forked from tari-project/tari
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCross.toml
81 lines (77 loc) · 2.1 KB
/
Cross.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
[build.env]
passthrough = [
"CFLAGS",
"TARGET",
"RUST_TARGET",
"BUILD_TARGET",
"CARGO_BUILD_TARGET",
"TARGET_CFLAGS",
"RUSTFLAGS",
"RUST_BACKTRACE",
"RUST_DEBUG",
"RUST_LOG",
"ARCH",
"FEATURES",
"ROARING_ARCH",
"TARI_NETWORK",
]
# Don't forget export:
# CFLAGS=-DMDB_USE_ROBUST=0
[target.x86_64-linux-android]
image = "ghcr.io/cross-rs/x86_64-linux-android:edge"
pre-build = [ """
export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get --assume-yes --no-install-recommends install \
curl unzip && \
curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v25.2/protoc-25.2-linux-x86_64.zip && \
unzip -o protoc-25.2-linux-x86_64.zip -d /usr/ && \
/usr/bin/protoc --version
""" ]
[target.aarch64-linux-android]
image = "ghcr.io/cross-rs/aarch64-linux-android:edge"
pre-build = [ """
export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get --assume-yes --no-install-recommends install \
curl unzip && \
curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v25.2/protoc-25.2-linux-x86_64.zip && \
unzip -o protoc-25.2-linux-x86_64.zip -d /usr/ && \
/usr/bin/protoc --version
""" ]
[target.aarch64-unknown-linux-gnu]
image = "ubuntu:18.04"
# Mergered all scripts/install_ubuntu_dependencies*.sh scripts
pre-build = [ """
apt-get update && \
apt-get -y install \
openssl \
libssl-dev \
pkg-config \
libsqlite3-dev \
clang-10 \
git \
cmake \
dh-autoreconf \
libc++-dev \
libc++abi-dev \
libprotobuf-dev \
protobuf-compiler \
libncurses5-dev \
libncursesw5-dev \
zip \
curl \
pkg-config-aarch64-linux-gnu \
gcc-aarch64-linux-gnu \
g++-aarch64-linux-gnu && \
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && \
export PATH="$HOME/.cargo/bin:$PATH" && \
rustup target add aarch64-unknown-linux-gnu && \
rustup toolchain install stable-aarch64-unknown-linux-gnu
""" ]
[target.aarch64-unknown-linux-gnu.env]
passthrough = [
"CARGO_BUILD_TARGET",
"CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc",
"BINDGEN_EXTRA_CLANG_ARGS=--sysroot /usr/aarch64-linux-gnu/include/",
]