mirror of
https://github.com/EFForg/rayhunter.git
synced 2026-04-26 15:39:59 -07:00
59 lines
2.0 KiB
TOML
59 lines
2.0 KiB
TOML
[alias]
|
|
# Build the daemon with "firmware" profile and "ring" TLS backend.
|
|
# Requires a cross-compiler (see github actions workflows) and is very slow to build.
|
|
build-daemon-firmware = "build -p rayhunter-daemon --bin rayhunter-daemon --target armv7-unknown-linux-musleabihf --profile firmware --no-default-features --features ring-tls"
|
|
# Build the daemon with "firmware-devel" profile and "rustcrypto" backend.
|
|
# Works with just the Rust toolchain, and is medium-slow to build. Binaries are slightly larger.
|
|
build-daemon-firmware-devel = "build -p rayhunter-daemon --bin rayhunter-daemon --target armv7-unknown-linux-musleabihf --profile firmware-devel"
|
|
|
|
[target.aarch64-apple-darwin]
|
|
linker = "rust-lld"
|
|
rustflags = ["-C", "target-feature=+crt-static"]
|
|
|
|
[target.aarch64-unknown-linux-musl]
|
|
linker = "rust-lld"
|
|
rustflags = ["-C", "target-feature=+crt-static"]
|
|
|
|
# apt install build-essential libc6-armhf-cross libc6-dev-armhf-cross gcc-arm-linux-gnueabihf
|
|
[target.armv7-unknown-linux-gnueabihf]
|
|
linker = "arm-linux-gnueabihf-gcc"
|
|
rustflags = ["-C", "target-feature=+crt-static"]
|
|
|
|
[target.armv7-unknown-linux-musleabihf]
|
|
linker = "rust-lld"
|
|
rustflags = ["-C", "target-feature=+crt-static"]
|
|
|
|
[target.armv7-unknown-linux-musleabi]
|
|
linker = "rust-lld"
|
|
rustflags = ["-C", "target-feature=+crt-static"]
|
|
|
|
# Disable rust-lld for x86 macOS because the linker crashers when compiling
|
|
# the installer in release mode with debug info on.
|
|
# [target.x86_64-apple-darwin]
|
|
# linker = "rust-lld"
|
|
# rustflags = ["-C", "target-feature=+crt-static"]
|
|
|
|
[target.x86_64-unknown-linux-musl]
|
|
linker = "rust-lld"
|
|
rustflags = ["-C", "target-feature=+crt-static"]
|
|
|
|
[profile.release]
|
|
# keep line numbers in stack traces for non-firmware binaries
|
|
debug = "limited"
|
|
lto = "fat"
|
|
opt-level = "z"
|
|
strip = "debuginfo"
|
|
|
|
[profile.firmware-devel]
|
|
inherits = "release"
|
|
opt-level = "s"
|
|
lto = false
|
|
|
|
# optimizations to reduce the binary size of firmware binaries
|
|
[profile.firmware]
|
|
inherits = "release"
|
|
strip = true
|
|
codegen-units = 1
|
|
panic = "abort"
|
|
debug = false
|