Browse Source

Nicer code: nighly and pregenerated bindings are not needed any more with latest (rustc 1.54.0) Rust stable toolchain

Release_2.1
Andreas Buff 2 months ago
parent
commit
fab9d37b9d
1 changed files with 6 additions and 14 deletions
  1. +6
    -14
      buildcode/sequoia.code

+ 6
- 14
buildcode/sequoia.code View File

@ -13,6 +13,7 @@ fi
NETTLE_BINDINGS="${SCRIPT_DIR}/buildcode/sequoia_resources/nettle-bindings.rs"
build_ios()
{
#TODO: change according to build_macos. Nightly and pregenerated bindings might not be required any more
cargo update
rustup run nightly cargo update
NETTLE_PREGENERATED_BINDINGS="${NETTLE_BINDINGS}" PKG_CONFIG_ALLOW_CROSS=1 RUST_BACKTRACE=1 PKG_CONFIG_PATH=$OUTPUT_DIR/${ARCH}/lib/pkgconfig RUSTFLAGS="-L ${PREFIX}/lib" rustup run nightly cargo build --target ${TARGET} -p sequoia-openpgp-ffi --release -Z build-std=core,alloc,std
@ -22,20 +23,11 @@ build_ios()
build_macos()
{
if [ ${ARCH} == "arm64" ]; then
rustup run nightly cargo update
SDKROOT=$(xcrun -sdk ${SDK} --show-sdk-path) \
# JSONAdapter needlessly requires libsequoia_ffi.a
NETTLE_PREGENERATED_BINDINGS="${SCRIPT_DIR}/nettle-bindings.rs" PKG_CONFIG_ALLOW_CROSS=1 RUST_BACKTRACE=full PKG_CONFIG_PATH=${CURRENT_LIB_DIR}/lib/pkgconfig RUSTFLAGS="-L ${PREFIX}/lib" rustup run nightly cargo build --target ${HOST} --release -Z build-std=core,alloc,std
elif [ ${ARCH} == "x86_64" ]; then
cargo update
SDKROOT=$(xcrun -sdk ${SDK} --show-sdk-path) \
# JSONAdapter needlessly requires libsequoia_ffi.a
PKG_CONFIG_ALLOW_CROSS=1 RUST_BACKTRACE=full PKG_CONFIG_PATH=${CURRENT_LIB_DIR}/lib/pkgconfig RUSTFLAGS="-L ${PREFIX}/lib" cargo build --target ${HOST} --release
else
echo "Unhandled ARCH"
exit 1
fi
cargo update
SDKROOT=$(xcrun -sdk ${SDK} --show-sdk-path) \
# JSONAdapter needlessly requires libsequoia_ffi.a
PKG_CONFIG_ALLOW_CROSS=1 RUST_BACKTRACE=full PKG_CONFIG_PATH=${CURRENT_LIB_DIR}/lib/pkgconfig RUSTFLAGS="-L ${PREFIX}/lib" cargo build --target ${HOST} --release
cp "${SEQUOIA_DIR}/target/${HOST}/release"/*.a "${CURRENT_LIB_DIR}/lib"
}


Loading…
Cancel
Save