rust-nex/build-edition.sh

19 lines
569 B
Shell
Raw Normal View History

2025-11-13 14:06:08 +01:00
#!/usr/bin/env bash
2026-04-26 14:57:02 +02:00
set -euo pipefail
2025-11-13 14:06:08 +01:00
if [ -z ${EDITION+x} ]; then
EDITION=$1
fi
# comma seperated list of features for the specified version
source ./buildscripts/common.sh
echo building $EDITION
2025-11-13 14:06:08 +01:00
echo FEATURES:
echo $EDITION_FEATURES
2026-05-29 08:00:01 +02:00
if [[ -v RNEX_STATIC ]]; then
cargo build --release --features "$EDITION_FEATURES"
else
OPENSSL_LIB_DIR=/usr/lib OPENSSL_INCLUDE_DIR=/usr/include/openssl OPENSSL_STATIC=1 RUSTFLAGS="-C relocation-model=static -C linker=ld.lld" cargo build --release --features "$EDITION_FEATURES" --target x86_64-unknown-linux-musl
fi