Skip to content
Closed
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: docker

on:
workflow_dispatch:
push:
branches:
- optional-proofs
Expand Down
22 changes: 20 additions & 2 deletions Cross.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,26 @@
[target.x86_64-unknown-linux-gnu]
pre-build = ["apt-get install -y cmake clang-5.0"]
# leveldb-sys v2.0.9 uses -Wthread-safety in its CMake build, which is a Clang-specific
# flag not recognised by GCC. Install clang and set CC/CXX so cmake-rs uses it.
image = "ghcr.io/cross-rs/x86_64-unknown-linux-gnu:main"
pre-build = ["apt-get install -y cmake clang"]

[target.x86_64-unknown-linux-gnu.env]
set = { CC = "clang", CXX = "clang++" }

[target.aarch64-unknown-linux-gnu]
pre-build = ["apt-get install -y cmake clang-5.0"]
# leveldb-sys v2.0.9 uses -Wthread-safety in its CMake build, which is a Clang-specific
# flag not recognised by aarch64-linux-gnu-gcc. Create thin clang wrapper scripts that
# target aarch64-linux-gnu using the installed GCC toolchain, then point cmake at them.
# CC must be a plain executable path (no inline flags), hence the wrapper scripts.
image = "ghcr.io/cross-rs/aarch64-unknown-linux-gnu:main"
pre-build = [
"apt-get install -y cmake clang gcc-aarch64-linux-gnu",
"printf '#!/bin/sh\\nexec clang -target aarch64-linux-gnu --gcc-toolchain=/usr \"$@\"\\n' > /usr/local/bin/aarch64-clang && chmod +x /usr/local/bin/aarch64-clang",
"printf '#!/bin/sh\\nexec clang++ -target aarch64-linux-gnu --gcc-toolchain=/usr \"$@\"\\n' > /usr/local/bin/aarch64-clang++ && chmod +x /usr/local/bin/aarch64-clang++"
]

[target.aarch64-unknown-linux-gnu.env]
set = { CC = "/usr/local/bin/aarch64-clang", CXX = "/usr/local/bin/aarch64-clang++" }

[target.riscv64gc-unknown-linux-gnu]
pre-build = ["apt-get install -y cmake clang"]
Expand Down
Loading